summaryrefslogtreecommitdiff
path: root/static/v10/man1/pc.1
blob: 26b507924c61f2faf22cfd1f592ac06cc08b9ff7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
.TH PC 1
.CT 1 prog_other
.SH NAME
pc \- pascal language compiler
.SH SYNOPSIS
.B pc
[
.I option
]
[
.B \-i
.I name ...
]
.I name ...
.SH DESCRIPTION
.I Pc
compiles the Pascal source file
.IB name .p
into an executable file called, by default,
.IR a.out .
.PP
Multiple 
.B .p
files are compiled into object files suffixed
.B .o
in place of
.BR .p .
Object files may be combined by
.IR ld (1)
into an executable
.I a.out
file.
Exactly one object file must supply a 
.B program
statement.
The other files contain
declarations which logically nest within the program.
Objects shared between separately compiled files
must be declared in
.BR include d
header files, whose names must end with
.BR .h .
An
.B external
directive, similar to
.BR forward ,
declares
.BR function s
and
.BR procedure s
in
.B .h
files.
.PP
These options have the same meaning as in
.IR cc (1):
.BR "-c -g -w -p -O -S -o" .
The following options are peculiar to
.IR pc .
.TP
.B -C
Compile code to perform runtime checks,
verify
.B assert
statements,
and initialize variables to zero as in
.IR pascal (1).
.PD 0
.TP
.B  -b
Block buffer the file
.I output.
.TP
.B  -i
Produce a listing for
the specified procedures, functions and
.B include
files.
.TP
.B  -l
Make a program listing during translation.
.TP
.B  -s
Accept standard Pascal only;
non-standard constructs cause warning diagnostics.
.TP
.B  -z
Allow execution profiling with
.IR pxp (A)
by generating statement counters, and arranging for the
creation of the profile data file
.I pmon.out
when the resulting object is executed.
.PD
.PP
Other arguments
are taken
to be loader option arguments,
perhaps libraries of
.IR pc -compatible
routines; see
.IR ld (1).
Certain options can also be controlled in comments within the program
as described in the
.I "Berkeley Pascal User's Manual."
.SH FILES
.TF /usr/lib/pc2.0strings
.TP
.B file.p
pascal source files
.TP
.B /usr/lib/pc0
compiler
.TP
.B /lib/f1
code generator
.TP
.B /usr/lib/pc2
runtime integrator (inline expander)
.TP
.B /lib/c2
peephole optimizer
.TP
.B /usr/lib/pc3
separate compilation consistency checker
.TP
.B /usr/lib/pc2.0strings
text of the error messages
.TP
.B /usr/lib/how_pc
basic usage explanation
.TP
.B /usr/lib/libpc.a
intrinsic functions and I/O library
.TP
.B /usr/lib/libm.a
math library
.TP
.B /lib/libc.a
standard library, see
.IR intro (3)
.SH "SEE ALSO"
.IR pascal (1),
.IR pxp (A) ,
.IR cc (1),
.IR ld (1),
.IR adb (1),
.IR sdb (1),
.IR prof (1)
.br
W. N. Joy, Susan L. Graham, C. B. Haley,
`Berkeley Pascal User's Manual', in
Unix Programmer's Manual, Seventh Edition, Virtual VAX-11 Version,
1980, Vol 2C
(Berkeley).
.SH DIAGNOSTICS
See 
.IR pascal (1)
for an explanation of the error message format.
Internal errors cause messages containing the word `SNARK'.
.SH BUGS
The keyword
.B packed
is recognized but has no effect.
.br
The binder is not as strict as it might be.
.br
The
.B -z
flag doesn't work for separately compiled files.
.br
Because
.B -s
is used by 
.I pc,
it can't be passed to the loader.