4.2BSD/usr/man/man1/pc.1

Compare this file to the similar file:
Show the results in this format:

.TH PC 1 "6 June 1983"
.UC 4
.SH NAME
pc \- Pascal compiler
.SH SYNOPSIS
.B pc
[ option ] [
.B \-i
name ...
] name ...
.SH DESCRIPTION
.I Pc
is a Pascal compiler.
If given an argument file ending with
.BR .p ,
it will compile the file 
and load it
into an executable file called, by default,
.IR a.out .
.PP
A program may be separated into more than one 
.B .p
file.
.I Pc
will compile a number of argument
.B .p
files into object files (with
the extension
.B .o
in place of
.BR .p ).
Object files may then be loaded 
into an executable
.I a.out
file.
Exactly one object file must supply a 
.B 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
.BR include d
header files, whose names must end with
.BR .h .
Header files may only be included at the outermost level,
and thus declare only globally available objects.
To allow
.BR function s
and
.BR procedure s
to be declared, an
.B external
directive has been added, whose use is similar to the
.B forward
directive but restricted to appear only in
.B .h
files.
.B Function
and 
.B procedure
bodies may not appear in
.B .h
files.
A binding phase of the compiler checks that declarations
are used consistently, to enforce the type checking rules of Pascal.
.PP
Object files 
created by other language processors may be loaded together with
object files created by 
.IR pc .
The
.BR function s
and
.BR procedure s
they define must have been declared
in
.B .h
files included by all the
.B .p
files which call those
routines.
Calling conventions are as in C,
with
.B var
parameters passed by address.
.PP
See the Berkeley Pascal User's Manual for details.
.PP
The following options have the same meaning as in
.IR cc (1)
and
.IR f77 (1).
See
.IR ld (1)
for load-time options.
.TP 6
.B \-c
Suppress loading and produce `.o' file(s) from source file(s).
.TP 6
.B \-g
Have the compiler produce additional symbol table information for
.IR dbx (1).
.TP 6
.BR \-w
Suppress warning messages.
.TP 6
.B \-p
Prepare object files for profiling, see
.IR  prof (1).
.TP 6
.SM
.B \-O
Invoke an
object-code improver.
.TP 6
.SM
.B \-S
Compile the named program, and leave the
assembler-language output on the corresponding file suffixed `.s'.
(No `.o' is created.).
.TP 6
.BR \-o " output"
Name the final output file
.I output
instead of
.I a.out.
.PP
The following options are peculiar to
.IR pc .
.TP 6
.B \-C
Compile code to perform runtime checks,
verify
.B assert
calls,
and initialize all variables to zero as in
.IR pi .
.TP 6
.B  \-b
Block buffer the file
.I output.
.TP 6
.B  \-i
Produce a listing for
the specified procedures, functions and
.B include
files.
.TP 6
.B  \-l
Make a program listing during translation.
.TP 6
.B  \-s
Accept standard Pascal only;
non-standard constructs cause warning diagnostics.
.TP 6
.BR \-t " directory"
Use the given
.I directory
for compiler temporary files.
.TP 6
.B  \-z
Allow execution profiling with
.I pxp
by generating statement counters, and arranging for the
creation of the profile data file
.I pmon.out
when the resulting object is executed.
.PP
Other arguments
are taken
to be loader option arguments,
perhaps libraries of
.IR pc
compatible routines.
Certain flags can also be controlled in comments within the program
as described in the
.I "Berkeley Pascal User's Manual."
.SH FILES
.ta 2.5i
file.p	pascal source files
.br
/usr/lib/pc0	compiler
.br
/lib/f1	code generator
.br
/usr/lib/pc2	runtime integrator (inline expander)
.br
/lib/c2	peephole optimizer
.br
/usr/lib/pc3	separate compilation consistency checker
.br
/usr/lib/pc2.*strings	text of the error messages
.br
/usr/lib/how_pc	basic usage explanation
.br
/usr/lib/libpc.a	intrinsic functions and I/O library
.br
/usr/lib/libm.a	math library
.br
/lib/libc.a	standard library, see \fIintro\fP(3)
.SH "SEE ALSO"
Berkeley Pascal User's Manual
.br
pi(1),
pxp(1),
pxref(1),
sdb(1)
.SH DIAGNOSTICS
For a basic explanation do
.IP
.B pc
.PP
See 
.IR pi (1).
for an explanation of the error message format.
Internal errors cause messages containing the word SNARK.
.SH AUTHORS
Charles B. Haley, William N. Joy, and Ken Thompson
.br
Retargetted to the second pass of the portable
.IR C
compiler by Peter Kessler
.br
Runtime library and inline optimizer by M. Kirk McKusick
.br
Separate compilation consistency checking by Louise Madrid
.SH BUGS
The keyword
.B packed
is recognized but has no effect.
.PP
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.
It will be made to perform these checks in its next incarnation,
so users are warned not to be sloppy.
.PP
The
.B \-z
flag doesn't work for separately compiled files.
.PP
Because the
.B \-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 
.IR strip (1)
after they are compiled.