RAD Studio |  |

#error

Syntax

Copy Code

    #error errmsg

Description

The #error directive generates the message:

Copy Code

    Error: filename line# : Error directive: errmsg

This directive is usually embedded in a preprocessor conditional statement that catches some undesired compile-time condition. In the normal case, that condition will be false. If the condition is true, you want the compiler to print an error message and stop the compile. You do this by putting an #error directive within a conditional statement that is true for the undesired case.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!