Compiler Directives
This section describes each of the DataFlex compiler directives. They are listed alphabetically. Compiler directives are used to control the features of the DataFlex compiler. The compiler directives can perform such tasks as conditional compilation, switch compiler options, create new command macros, and so on.
Current compiler directives include:
| Directive | Description |
|---|---|
| #Check | Checks the validity of an identifier against a list of type-checking characters. |
| #ChkSub | Verifies that the version# is the same as the compiler's own version for the specified subsystem. |
| #Command | Allows you to define a new commands using sequences of existing DataFlex commands. |
| #Compat | Sets the compile-time revision integer !@. |
| #Data | Prepares the compiler to accept the arguments of an object declaration. |
| #DPush | Pushes a symbol onto the data compile-time stack. |
| #EntOpt | Evaluates the options of the last previous entry_item statement. |
| #EndHeader | Terminates a precompiled program-header section. |
| #EndIf | Specifies conditionally compiled code based on some expression that is evaluated at compile-time. |
| #Error | Declares a compile time error. |
| #FRef | Instructs the compiler how to resolve a, so far, undefined symbol. |
| #FReg | Registers a function and its arguments to the compiler. |
| #Header | Saves time in program development and recompilation by designating the initial portion of a program's source code for precompilation. |
| #Include | Incorporates into a program at compile time, program source code from another source-code file. |
| #If | Specifies conditionally compiled code based on some expression that is evaluated at compile-time. |
| #IfDef | Specifies conditionally compiled code based on whether a symbol has been typed (or defined). |
| #IfNDef | Specifies conditionally compiled code based on whether a symbol has not been typed (or defined). |
| #IfClass | Specifies conditionally compiled code based the class of a symbol. |
| #IfSame | Specifies conditionally compiled code based on the comparison of a symbol to one or more literal values at compile-time. |
| #IfSub | Specifies conditionally compiled code based on whether a symbol is substitutable or not. |
| #IfType | Specifies conditionally compiled code based the type of a symbol. |
| #If2Type | Works in the same way as the #IfType command except that two symbols are tested together instead of just one. |
| #Noisy | Specifies the compiler verbosity level. |
| #Num | Sets space aside in the static data area for a Number or Date runtime variable. Reserves 12 bytes per variable. |
| #Pop | Pops a value off the primary compile-time stack. |
| #Push | Pushes a compile-time variable onto the primary compile-time stack. |
| #Real | Sets space aside in the static data area for a Real runtime variable. Reserves 8 bytes per variable. |
| #Set | Assigns a value to an Integer compile-time variable. |
| #SPop | Pops a value off the string compile-time stack. |
| #SPush | Pushes a value onto the string compile-time stack. |
| #StkSym | Destroys all stack type symbols, |S?. |
| #Str | Sets space aside in the static data area for a String runtime variable. |
| #Warning | Causes compiler to output a warning. |
| !@ - Revision Variable | Stamps the compiled program file with the DataFlex revision number under which it was compiled. |
| !$ - String Variable | Holds any character string needed by the programmer during the compilation process. |
See also Predefined Conditionals.