Pascal Preprocessor
251
A
Example
The
%elseif
Directive
The
%elseif
directive provides an alternative action to the
%if
directive.
Syntax
%if
expression
%then
.
.
%elseif
expression
%then
.
.
%endif
The Pascal program,
if_then_else.p
program if_then_else (output);
%var red
begin
%if red %then
writeln ('It is red.');
%else
writeln ('It is not red.')
%endif
end.
The output when you compile
if_then_else.p
without the
-config
hostname% pc -xl if_then_else.p
hostname% a.out
It is not red.
The output when you supply
-config
with the argument
red
hostname% pc -xl -config red if_then_else.p
hostname% a.out
It is red.
Summary of Contents for SunSoft Pascal 4.0
Page 14: ...xiv Pascal 4 0 User s Guide ...
Page 16: ...xvi Pascal 4 0 User s Guide ...
Page 30: ...6 Pascal 4 0 User s Guide 1 ...
Page 160: ...136 Pascal 4 0 User s Guide 6 ...
Page 268: ...244 Pascal 4 0 User s Guide 11 ...
Page 320: ...296 Pascal 4 0 User s Guide B ...
Page 331: ...Index 307 ...
Page 333: ......