A

A defined conditional variable is enabled (true) when it appears in either the %enable directive or in the –configoption; otherwise, it is disabled (false), as in:

%var one two %enable two

The following section describes %var and %enable. Programs that contain conditional variables must be compiled with the –xloption.

Compiler Directives

A directive indicates some action for the compiler to take. You can use a directive anywhere in your program.

Each directive consists of a percent sign (%) followed by the directive name. Programs that contain compiler directives must be compiled with the –xloption.

Table A-1 summarizes the compiler directives.

Table A-1cppas Compiler Directives

Compiler

 

Directive

Description

 

 

%config

Sets a special predefined conditional variable with a value of either

 

true or false.

 

 

%debug

Instructs pc to compile this line of code when you use the -cond

 

compiler directive.

 

 

%else

If expression in %if expression %then is false, the compiler skips over

 

the %then part and executes the %else part instead.

 

 

%elseif

If expression in %if expression %then is false, the compiler skips over

 

the %then part and executes the %elseif part instead. Similar to

 

%else.

 

 

%elseifdef

If expression in %ifdef expression %then is false, the compiler skips over

 

the %then part and executes the %elseifdef part instead.

 

 

%enable

Sets a conditional variable to true.

 

 

%endif

Indicates the end of an %if or %ifdef directive.

 

 

%error

Prints a string on the standard output and treats it as an error.

 

 

246

Pascal 4.0 User’s Guide