![](/images/backgrounds/286549/hp-sunsoft-pascal-4-0-users-manual-549395282x1.png)
A
Comments
When pc encounters a %if directive, it evaluates expression. If expression is true, pc executes the statements in the %then part. If expression is false, pc skips over the %then part and executes the %else, %elseif, or %endif directive. If no such directive exists, pc proceeds to the next statement.
The expression consists of a conditional variable and the optional boolean operators and, or, and not. You can set a conditional variable on the
Assuming one and two are conditional variables, expression can be any of the following:
one two
one and two one or two not one not two
Example
See the example in the %else listing on page 250.
The %ifdef DirectiveThe %ifdef directive determines whether or not you previously defined a conditional variable in a %var directive.
Syntax
%ifdef expression %then
.
.
%elseifdef expression %then
.
.
%endif
258 | Pascal 4.0 User’s Guide |