79 of 158
73 One implication of this is that adding a definition of a conditional identifier may result in a compiler message related to a Const definition warning about duplicate definitions. Conditional identifiers defined using a compiler option are visible in all modules while those defined in a particular module are only visible in that module. Also note that conditional identifiers are essentially module-level constants. This is true even if they are defined in a procedure. A consequence of this is that in spite of whether a conditional identifier is defined inside a procedure or not, its value is visible to all subsequent conditional expressions in the module. BasicX Compatibility Note Conditional constructs are not supported in BasicX compatibility mode. 3.13 Error Directive Sometimes it is useful to be able to purposely generate an error message in order to remind yourself of some detail or condition that requires attention. Often, this is used in conjunction with conditional directives to point out that an incompatible set of conditions exists. The form of the error directive is shown below. #error <message> All of the characters beginning with the first non-white space character following #error up to the end-of- line will appear as the error message. If the last character on the line is an underscore and is preceded by a space or tab character, it is treated as a continued line and all of the characters on the next line up to the end-of-line will also be part of the error message. Example #if PLATFORM = "alpha" Const Frequency As Single = 42.347 #elseif PLATFORM = "beta" Const Frequency As Single = 45.347 #else #error No platform specified. #endif 3.14 Notice Directive This directive is similar to the #error directive discussed in the previous section in that it adds a string to the error output. However, its used does not increase the error count like #error does. The form of the error directive is shown below. #notice <message> 3.15 Include Directive You may use an include directive in a source file to cause another source file to be compiled as well. The form of the include directive is: #include "<filename>"