Pristine Ack-5.5
[Ack-5.5.git] / fast / driver / afpc.1
1 .TH AFPC 1
2 .SH NAME
3 afpc \- fast ACK compatible Pascal compiler
4 .SH SYNOPSIS
5 .B afpc
6 [
7 .B \-c
8 ]
9 [
10 .B \-v
11 ]
12 [
13 .B \-vn
14 ]
15 [ \fB\-D\fIname\fR ]
16 [ \fB\-D\fIname\fB=\fIdef\fR ]
17 [
18 .BI \-I pathname
19 ]
20 [
21 .B \-w
22 ]
23 [
24 .B \-g
25 ]
26 [
27 .B \-L
28 ]
29 [
30 .B \-o 
31 .I outfile
32 ]
33 [
34 .B \-R
35 ]
36 [
37 .B \-A
38 ]
39 [
40 .B \-a
41 ]
42 [
43 .B \-d
44 ]
45 [
46 .BI \-i num
47 ]
48 [
49 .B \-t
50 ]
51 [
52 .B \-C
53 ]
54 [
55 .B \-U+
56 ]
57 [
58 .B \-u+
59 ]
60 [
61 .B \-s+
62 ]
63 [
64 .B \-c+
65 ]
66 [
67 .BI \-U name
68 ]
69 [
70 .BI -M compiler
71 ]
72 .I sourcefile ...
73 .SH DESCRIPTION
74 .LP
75 .I afpc
76 is a fast
77 .B Pascal
78 compiler. It translates 
79 .B Pascal
80 programs
81 into ack(1)-compatible relocatable object modules, and does so in one pass.
82 Then, if the \fB\-c\fP flag is not given,
83 .I afpc
84 offers the object modules to a link-editor,
85 to create an executable binary.
86 .LP
87 .I Fpc
88 accepts several types of filename arguments.  Files with 
89 names ending in
90 .B .p
91 are taken to be 
92 .B Pascal
93 source programs. 
94 They are compiled, and the resulting object module is placed in the current
95 directory.
96 The object module is named after its source file, the suffix
97 .B .o
98 replacing 
99 .BR .p
100 in the name of the object.
101 A file with suffix
102 .B .p
103 is passed through the C preprocessor if it begins with a '#'.
104 .LP
105 Other arguments refer to loader options,
106 object modules, or object libraries.
107 Unless the
108 .B \-c
109 flag is given, these modules and libraries, together with the results of any
110 specified compilations, are passed (in the order given) to the
111 link-editor to produce
112 an output file named
113 .IR a.out .
114 You can specify a name for the executable by using the
115 .B \-o 
116 option.
117 .LP
118 If a single 
119 .B Pascal
120 program is compiled and loaded all at once, the object module
121 file is deleted.
122 .SH OPTIONS
123 .LP
124 .IP \fB\-c\fP
125 .br
126 Suppress the loading phase of the compilation, and force an object module to
127 be produced, even if only one program is compiled.
128 A single object module can be named explicitly using the
129 .B \-o
130 option.
131 .IP \fB\-D\fIname\fR\fB=\fIdef\fR
132 Define a symbol
133 .I name
134 to the 
135 preprocessor, as if by "#define".
136 .IP \fB\-D\fIname\fR
137 .br
138 same as \fB\-D\fIname\fB=1\fR.
139 .IP \fB\-I\fIpathname\fR
140 .br
141 Add
142 .I pathname
143 to the list of directories in which to search for
144 .B #include
145 files with filenames not beginning with slash.
146 The preprocessor first searches for
147 .B #include
148 files in the directory containing
149 .I sourcefile,
150 then in directories in
151 .B \-I
152 options, and finally, in
153 .I /usr/include.
154 .IP "\fB\-o \fIoutput\fR"
155 Name the final output file
156 .I output.
157 .IP \fB\-U\fIname\fR
158 .br
159 Remove any initial definition of
160 .I name.
161 .IP \fB\-v\fP
162 .br
163 Verbose. Print the commands as they are executed.
164 .IP \fB\-vn\fP
165 .br
166 Verbose, no execute. Only print the commands, do not execute them.
167 .IP \fB\-L\fP
168 .br
169 do not generate code to keep track of
170 the current location in the source code.
171 .IP \fB\-g\fP
172 .br
173 Produce symbolic debugging information for grind(1).
174 .IP \fB\-w\fP
175 .br
176 suppress warning messages.
177 .IP \fB\-d\fP
178 .br
179 allow for "long"s.
180 .IP \fB\-i\fInum\fR
181 .br
182 set size for integer sets. By default, the set size is the word size.
183 .IP \fB\-C\fP
184 .br
185 distinguish between lower case and upper case. Normally, upper case letters
186 are considered equal to their lower case counterpart.
187 .IP \fB\-t\fP
188 .br
189 trace calls and exits of procedures and functions.
190 .IP \fB\-R\fP
191 .br
192 disable all range-checks.
193 .IP \fB\-A\fP
194 .br
195 enable extra array bound checks. Unfortunately, the back-end used for this
196 compiler is a bit sloppy, so extra array bound checks are needed if you want
197 detection of array bound errors.
198 .IP \fB\-a\fP
199 .br
200 disable assertions. Assertions are skipped instead of evaluated.
201 .IP "\fB\-U+\fP, \fB\-u+\fP"
202 .br
203 allow for underscores within identifiers. Identifiers may not start
204 with an underscore, even if this flag is given.
205 .IP \fB-s+\fP
206 .br
207 allow only standard 
208 .BR Pascal .
209 This disables the \fB\-c+\fP, \fB\-d\fR, \fB\-u+\fR,
210 \fB\-U+\fR and \fB\-C\fR options.
211 Furthermore, assertions are not recognized at all.
212 .IP \fB-c+\fP
213 .br
214 allow C-like strings. This option is mainly intended for usage with
215 C-functions. This option will cause the type 'string' to be known.
216 .IP \fB\-M\fIcompiler\fR
217 .br
218 use \fIcompiler\fR as Modula-2 compiler instead of the default.
219 .SH "SEE ALSO"
220 .IP [1]
221 J.W. Stevenson, H. v. Eck, \fIAmsterdam Compiler Kit-Pascal reference manual\fP.
222 .IP [2]
223 ack(1) unix manual page.
224 .IP [3]
225 grind(1) unix manual page.
226 .SH DIAGNOSTICS
227 Diagnostics are intended to be self-explanatory.