Pascal Preprocessor
255
A
Example
The
%endif
Directive
The
%endif
directive indicates the end of a
%if
or
%ifdef
directive. See the
sections on
%if
and
%ifdef
for more information on this directive.
The
%error
Directive
The
%error
directive causes the compiler to print a string on the standard
output and treat it as an error.
The Pascal program,
enable.p
. This example sets
the conditional variable
two
to
true
, which is equivalent to
setting the
-config
option to
two
on the command-line.
program enable_example(output);
{ This program demonstrates the use of
the %enable compiler directive. }
var
a: integer;
b: integer;
%var one, two
%enable two
begin
%if one %then
a := maxint;
writeln('One is defined as ', a:2, '.');
%endif
%if two %then
b := minint;
writeln('Two is defined as ', b:2, '.');
%endif
end. { enable_example }
The commands to compile and
output
enable.p
hostname% pc -xl enable.p
hostname% a.out
Two is defined as -32768.
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: ......