pc(1) — VAX
Name
pc − Pascal compiler
Syntax
pc [option] name...
Description
The pc 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 pc 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 included header files, whose names must end with .h. Header files may only be included at the outermost 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 .h files. The function and procedure bodies may not appear in .h 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 pc. 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 cc(1) and f77(1). See ld(1) for load-time options.
−cSuppresses loading and produce .o files from source files.
−gProduces additional symbol table information for dbx(1).
−wSuppresses warning messages.
−OInvokes an object-code improver.
−o outputNames the final output file output instead of a.out.
−pPrepares object files for profiling. For further information, see prof(1).
−SCompiles the named program, and leave the assembler-language output on the corresponding file suffixed .s. No .o file is created.
The following options are peculiar to pc.
−CCompiles code to perform runtime checks, verify assert calls, and initialize all variables to zero as in pi.
−bBlock buffers the file output.
−inameProduces a listing for the specified procedures, functions and include files.
−lMakes a program listing during translation.
−sAccepts standard Pascal only and non-standard constructs 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 strip(1) after they are compiled.
−t directoryUses the given directory for compiler temporary files.
−zAllows execution profiling with pxp by generating statement counters, and arranging for the creation of the profile data file pmon.out when the resulting 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 pc 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 pi(1) for an explanation of the error message format.
Files
file.ppascal source files
/usr/lib/pc0compiler
/lib/f1code generator
/usr/lib/pc2runtime integrator (inline expander)
/lib/c2peephole optimizer
/usr/lib/pc3separate compilation consistency checker
/usr/lib/pc2.*stringstext of the error messages
/usr/lib/how_pcbasic usage explanation
/usr/lib/libpc.aintrinsic functions and I/O library
/usr/lib/libm.amath library
/lib/libc.astandard library, see intro(3)
See Also
pi(1), pxp(1), pxref(1)
"Berkeley Pascal User’s Manual," ULTRIX Supplementary Documents,
Vol. II:Programmer