![](/images/backgrounds/286549/hp-sunsoft-pascal-4-0-users-manual-549395275x1.png)
A
The Pascal program, if_then_else.p
Example
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
The output when you supply
hostname% pc
It is not red.
hostname% pc
It is red.
The %elseif DirectiveThe %elseif directive provides an alternative action to the %if directive.
Syntax
%if expression %then
.
.
%elseif expression %then
.
.
%endif
Pascal Preprocessor | 251 |