3

To identify the version number given an executable or object file created by the

Pascal compiler, use the following command.

hostname% mcs -p a.out grep Pascal

SC4.0 18 Mar 1995 Pascal 4.0

Compile and Link Sequence

You can compile the file any.p with the following command-line:

hostname% pc any.p

This command actually invokes the compiler driver, which calls several programs or passes of the program, each of which processes the program. The output of each pass is the input to the next one.

After several passes, the object file any.o is created. An executable file is then generated with the default name a.out. Finally, the file any.o is removed.

pc calls:

cpp, the C preprocessor or cppas, the preprocessor used when you use the -xloption

pc0, the Pascal front end

The global optimizer if you use the -Ooption

cg, the code generator, which generates the relocatable object file

pc3, which checks for conflicts in symbol names

ld, the linker, which generates the executable files using any libraries necessary to resolve undefined symbols

The above is the default action of pc; some compiler options change what pc calls.

18

Pascal 4.0 User’s Guide