%IF Example
Example 1:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Lines 1 and 2 are compiled only if FLAG1 is 0. Lines 3 through 5 are compiled only if FLAG1 is 0 and FLAG2 is 1. Line 6 is compiled only if FLAG1 is 0 and FLAG2 is 2. Lines 7 and 8 are compiled only if FLAG1 is 0 and FLAG2 is 3. Line 9 is compiled only if FLAG1 is 0 and FLAG2 is not 1, 2, or 3. The %ENDIF directive terminates only the current conditional compilation.
Example 2:
|
|
|
|
|
|
|
|
|
|
|
|
If the type of the variable "file" is IFILE, a message is displayed.
Example 3:
|
|
|
|
|
|
|
|
|
|
|
|
This example illustrates the user of a language directive as an operand.
![]() |