add .Vx so tmac.andoc will call tmac.mdoc-old
[unix-history] / usr / src / usr.bin / pascal / pi / pi.1
CommitLineData
b5dc1377
CL
1.\" Copyright (c) 1980, 1990 The Regents of the University of California.
2.\" All rights reserved.
1628125f 3.\"
b5dc1377 4.\" %sccs.include.redist.man%
1628125f 5.\"
d0719240 6.\" @(#)pi.1 6.3 (Berkeley) %G%
b5dc1377
CL
7.\"
8.Dd
9.Dt PI 1
1628125f 10.UC
b5dc1377
CL
11.Sh NAME
12.Nm pi
13.Nd Pascal interpreter code translator
14.Sh SYNOPSIS
15.Nm pi
16.Op Fl blnpstuwz
17.Op Fl i Ar name ...
18.Ar name.p
19.Sh DESCRIPTION
20.Nm Pi
1628125f 21translates the program in the file
b5dc1377 22.Ar name.p
1628125f 23leaving interpreter code in the file
b5dc1377 24.Pa obj
1628125f
KM
25in the current directory.
26The interpreter code can be executed using
b5dc1377
CL
27.Nm px .
28.Nm Pix
1628125f 29performs the functions of
b5dc1377 30.Nm pi
1628125f 31and
b5dc1377 32.Nm px
1628125f 33for `load and go' Pascal.
b5dc1377
CL
34.Pp
35The following flags are interpreted by
36.Nm pi ;
1628125f
KM
37the associated options can also be controlled in comments within the program
38as described in the
b5dc1377
CL
39.Em "Berkeley Pascal User's Manual."
40.Tw Fl
41.Tp Fl b
1628125f 42Block buffer the file
b5dc1377
CL
43.Ar output .
44.Tp Fl i
1628125f
KM
45Enable the listing for
46any specified procedures and functions and while processing any specified
b5dc1377 47.Ic include
1628125f 48files.
b5dc1377 49.Tp Fl l
1628125f 50Make a program listing during translation.
b5dc1377 51.Tp Fl n
1628125f 52Begin each listed
b5dc1377 53.Ic include
1628125f 54file on a new page with a banner line.
b5dc1377 55.Tp Fl p
1628125f
KM
56Suppress the post-mortem control flow backtrace
57if an error occurs;
58suppress statement limit counting.
b5dc1377 59.Tp Fl s
1628125f
KM
60Accept standard Pascal only;
61non-standard constructs cause warning diagnostics.
b5dc1377 62.Tp Fl t
1628125f 63Suppress runtime tests of subrange variables and treat
b5dc1377 64.Ic assert
1628125f 65statements as comments.
b5dc1377 66.Tp Fl u
1628125f
KM
67Card image mode;
68only the first 72 characters of input lines are used.
b5dc1377 69.Tp Fl w
1628125f 70Suppress warning diagnostics.
b5dc1377 71.Tp Fl z
1628125f 72Allow execution profiling with
b5dc1377 73.Nm pxp
1628125f
KM
74by generating statement counters, and arranging for the
75creation of the profile data file
b5dc1377 76.Pa pmon.out
1628125f 77when the resulting object is executed.
b5dc1377
CL
78.Tp
79.Sh FILES
80.Dw /usr/lib/pi1.*strings
81.Di L
82.Dp Pa file.p
83input file
84.Dp Pa file.i
85include file(s)
86.Dp Pa /usr/lib/pi2.*strings
87text of the error messages
88.Dp Pa /usr/lib/how_pi*
89basic usage explanation
90.Dp Pa obj
91interpreter code output
92.Dp
93.Sh SEE ALSO
94.Em Berkeley Pascal User'.Xr s Manual
1628125f 95.br
b5dc1377
CL
96.Xr pix 1 ,
97.Xr px 1 ,
98.Xr pxp 1 ,
99.Xr pxref 1
100.Sh DIAGNOSTICS
1628125f 101For a basic explanation do
b5dc1377
CL
102.Pp
103.Df I
104.Nm pi
105.De
106.Pp
1628125f
KM
107In the diagnostic output of the translator,
108lines containing syntax errors are listed with a flag indicating the
109point of error.
110Diagnostic messages indicate the action which the recovery mechanism
111took in order to be able to continue parsing.
112Some diagnostics indicate only that the input is `malformed.'
113This occurs if the recovery can find no simple correction to make the input
114syntactically valid.
b5dc1377 115.Pp
1628125f
KM
116Semantic error diagnostics indicate a line in the source text near the
117point of error.
118Some errors evoke more than one diagnostic to help pinpoint the error;
119the follow-up messages begin with an ellipsis `...'.
b5dc1377 120.Pp
1628125f
KM
121.ne 8
122The first character of each error message indicates its class:
b5dc1377
CL
123.Pp
124.Dw Fl
125.Di L
126.Dp Li E
127Fatal error; no code will be generated.
128.Dp e
129Non-fatal error.
130.Dp w
131Warning \- a potential problem.
132.Dp s
133Non-standard Pascal construct warning.
134.Dp
135.Pp
1628125f
KM
136If a severe error occurs which inhibits further processing,
137the translator will give a diagnostic and then `QUIT'.
b5dc1377 138.Sh AUTHORS
1628125f
KM
139Charles B. Haley, William N. Joy, and Ken Thompson
140.br
141Ported to VAX-11 by Peter Kessler
b5dc1377 142.Sh BUGS
1628125f 143The keyword
b5dc1377 144.Ic packed
1628125f 145is recognized but has no effect.
b5dc1377 146.Pp
1628125f
KM
147For clarity,
148semantic errors should be flagged at an appropriate place in the source text,
149and multiple instances of the `same' semantic error should be summarized
150at the end of a
b5dc1377 151.Ic procedure
1628125f 152or
b5dc1377 153.Ic function
1628125f 154rather than evoking many diagnostics.
b5dc1377 155.Pp
1628125f 156When
b5dc1377 157.Ic include
1628125f
KM
158files are present,
159diagnostics relating to the last procedure in one file may appear after the
160beginning of the listing of the next.
b5dc1377
CL
161.\" .Sh ENVIRONMENT
162.Sh HISTORY
163.Nm Pi
164appeared in 3 BSD.