pc(1)pc(1)Namepc - Pascal compiler
Syntaxpc [option] name...
Description
The command is a Pascal compiler. If given an argument file ending
with a .p, it compiles and loads the file into an executable file
called, by default, a.out.
A program may be separated into more than one .p file. The command
compiles a number of argument .p files into object files (with the
extension .o in place of .p). Object files may then be loaded into an
executable a.out file. Exactly one object file must supply a program
statement to successfully create an executable a.out file. The rest of
the files must consist only of declarations which logically nest within
the program. References to objects shared between separately compiled
files are allowed if the objects are declared in header files, whose
names must end with .h. Header files may only be included at the out‐
ermost level, and thus declare only globally available objects. To
allow functions and procedures to be declared, an external directive
has been added, whose use is similar to the forward directive but
restricted to appear only in files. The function and procedure bodies
may not appear in files. A binding phase of the compiler checks that
declarations are used consistently, to enforce the type checking rules
of Pascal. The binder is not as strict as described here, with regard
to the rules about external declarations only in .h files and including
.h files only at the outermost level.
Object files created by other language processors may be loaded
together with object files created by The functions and procedures they
define must have been declared in .h files included by all the .p files
which call those routines. Calling conventions are as in C, with var
parameters passed by address.
Options
The following options have the same meaning as in and (Note that is
from the unsupported subset.) See for load-time options.
-c Suppresses loading and produce .o files from source
files.
-g Produces additional symbol table information for
-w Suppresses warning messages.
-O Invokes an object-code improver.
-o output Names the final output file output instead of
a.out.
-p Prepares object files for profiling. For further
information, see
-S Compiles the named program, and leave the assem‐
bler-language output on the corresponding file suf‐
fixed .s. No .o file is created.
The following options are peculiar to
-C Compiles code to perform runtime checks, verify
calls, and initialize all variables to zero as in
pi.
-b Block buffers the file output.
-iname Produces a listing for the specified procedures,
functions and files.
-l Makes a program listing during translation.
-s Accepts standard Pascal only and non-standard con‐
structs cause warning diagnostics.
Because the -s option is usurped by the compiler, it is not possible to
pass the strip option to the loader. Thus programs which are to be
stripped, must be run through after they are compiled.
-t directory Uses the given directory for compiler temporary
files.
-z Allows execution profiling with by generating
statement counters, and arranging for the creation
of the profile data file pmon.out when the result‐
ing object is executed. The -z flag doesn't work
for separately compiled files.
Other arguments are taken to be loader option arguments, perhaps
libraries of compatible routines. Certain flags can also be controlled
in comments within the program.
Restrictions
The keyword packed is recognized but has no effect.
Diagnostics
See for an explanation of the error message format.
Files
file.p pascal source files
/usr/lib/pc0 compiler
/lib/f1 code generator
/usr/lib/pc2 runtime integrator (inline expander)
/lib/c2 peephole optimizer
/usr/lib/pc3 separate compilation consistency checker
/usr/lib/pc2.*strings text of the error messages
/usr/lib/how_pc basic usage explanation
/usr/lib/libpc.a intrinsic functions and I/O library
/usr/lib/libm.a math library
/lib/libc.a standard library, see intro(3)See Alsopi(1), pxp(1), pxref(1)
"Berkeley Pascal User's Manual," Supplementary Documents, Volume 2:
Programmer
VAX pc(1)