PC(1) — UNIX Programmer’s Manual
NAME
pc − Pascal compiler
SYNOPSIS
pc [-o ofile] [-i] [-c] [-u] [-v] file ...
DESCRIPTION
pc, the PASCAL compiler, accepts a list of Pascal source files and various intermediate texts contained in the list of files specified by file and puts the resulting executable object module in a.out (but see the -o option, described below).
In order to understand the use of pc, the reader must first understand the steps which the compiler goes through in order to turn a Pascal source program into an executable object file.
The Pascal compiler generates several intermediate files on the way to generating the final executable file. The first phase of the compiler generates an intermediate file, of the same name as the source file, but with a .i suffix. This intermediate file is destined for processing by the code generator.
The code generator is the second phase of the process. The output of the code generator is a file with the same name as the source file, but with a suffix of .obj. The *.obj file is the input to the next phase, called ulinker.
The ulinker phase of the compilation process converts the .obj file into a UNIX-style object file with a .o suffix. This file can then be processed by the UNIX loader utility, ld.
Finally, the ld utility produces the final executable code file.
When using pc, any combination of Pascal source files (each having a .for suffix) can be combined with Pascal or FORTRAN intermediate files (each having a .i suffix), Pascal or FORTRAN object code files (each having a .obj suffix), and UNIX object files (each having a .o suffix). When the compilation completes successfully, the result of the combination of all those files is placed in the file a.out or in the file specified by the -o option.
The -o option, if given, specifies that the file ofile (runnable file) whose name follows the option is the file to receive the final executable code. If the -o option is not specified, the resultant executable file is placed in the file a.out.
If the -i option is given, the Pascal intermediate code (the result of running /lib/pascal) is placed in a file of the same name as the source file, but with a suffix of .i appended. The compilation then terminates.
If the -c option is given, the Pascal unlinked object code (the result of running /lib/code) is placed in a file of the same name as the source file, but with a suffix of
If the -u option is given, the linked object code (the result of running /lib/ulinker) is placed in a file of the same name as the source file, but with a suffix of
The -v (for verbose) option makes pc display a running progress report as it compiles.
If only one file argument is supplied on the command line, then all the intermediate files (.i, .obj, .o) are removed at the end of the compilation. If multiple file arguments are typed on the command line, any existing intermediate files are not removed.
EXAMPLES
pc prog1.pas
compiles prog1.pas and puts the resulting object module in a.out.
pc -o frammis prog2.pas prog3.obj
compiles the Pascal program called prog2.pas and links the result with the object file prog3.obj. The result of the compilation is placed in the output file called frammis.
FILES
*.pas Pascal source
*.i Intermediate code
*.obj Compiled unlinked pc object
*.o Compiled unlinked UNIX object
/lib/paslib.obj
/lib/pascal
/lib/code
/lib/ulinker
/lib/pascterrs
SEE ALSO
"User Documentation Update for UniSoft Pascal and FORTRAN".
7th Edition — 4/5/82