Options – HP SunSoft Pascal 4.0 User Manual

Page 47

Advertising
background image

The Pascal Compiler

23

3

If no values have been pushed onto the stack, the effect of

*

is undefined.

Figure 3-2 illustrates how options are passed in program text.

Figure 3-2

Options in Program Text

Options

This section describes all the

pc

command options in alphabetical order.

Unless otherwise stated at the beginning of the description for the option, all of
these options work for both the Solaris 1.x and Solaris 2.x environments.

In general, processing of the compiler options is from left to right, so selective
overriding of macros can be done. This rule does not apply to linker options.

When the compiler encounters an
option followed by...

This is what happens...

+

The current value is pushed onto the stack, and
the current value becomes ON.

-

The current value is pushed onto the stack, and
the current value becomes OFF.

*

The last value is popped off the stack and
becomes the current value.

program options (output);

begin

{$l+ Turns on listing}

writeln ('After $l-');

{$l- Turns off listing}

{Notice that this line prints.}

writeln ('After $l+');

{$l* Turns listing on again}

{Notice that this line does not print.}

writeln ('After $l*')

end.

hostname% pc options.p

Fri Mar 1 17:33:18 1995 options.p:

4

writeln ('After $l-');

5 {$l- Turns off listing}

6 {Notice that this line prints.}

10 writeln ('After $l*')

11 end.

Program:

Output:

Advertising