Annotation of 43BSDReno/pgrm/pascal/pc/pc.1, revision 1.1.1.1

1.1       root        1: .\" Copyright (c) 1980, 1990 The Regents of the University of California.
                      2: .\" All rights reserved.
                      3: .\"
                      4: .\" Redistribution and use in source and binary forms are permitted provided
                      5: .\" that: (1) source distributions retain this entire copyright notice and
                      6: .\" comment, and (2) distributions including binaries display the following
                      7: .\" acknowledgement:  ``This product includes software developed by the
                      8: .\" University of California, Berkeley and its contributors'' in the
                      9: .\" documentation or other materials provided with the distribution and in
                     10: .\" all advertising materials mentioning features or use of this software.
                     11: .\" Neither the name of the University nor the names of its contributors may
                     12: .\" be used to endorse or promote products derived from this software without
                     13: .\" specific prior written permission.
                     14: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
                     15: .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
                     16: .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                     17: .\"
                     18: .\"     @(#)pc.1       6.2 (Berkeley) 6/11/90
                     19: .\"
                     20: .Dd June 11, 1990
                     21: .Dt PC 1
                     22: .Os BSD 4
                     23: .Sh NAME
                     24: .Nm pc
                     25: .Nd Pascal compiler
                     26: .Sh SYNOPSIS
                     27: .Nm pc
                     28: .Op  option
                     29: .Op Fl i Ar name \&...
                     30: .Ar name \&...
                     31: .Sh DESCRIPTION
                     32: .Nm Pc
                     33: is a Pascal compiler.
                     34: If given an argument file ending with
                     35: .Pa \&.p ,
                     36: it will compile the file
                     37: and load it
                     38: into an executable file called, by default,
                     39: .Pa a.out  .
                     40: .Pp
                     41: A program may be separated into more than one
                     42: .Pa \&.p
                     43: file.
                     44: .Nm Pc
                     45: will compile a number of argument
                     46: .Pa \&.p
                     47: files into object files (with
                     48: the extension
                     49: .Pa \&.o
                     50: in place of
                     51: .Pa \&.p ) .
                     52: Object files may then be loaded
                     53: into an executable
                     54: .Pa a.out
                     55: file.
                     56: Exactly one object file must supply a
                     57: .Ar program
                     58: statement to successfully create an executable a.out file.
                     59: The rest of the files must consist only of
                     60: declarations which logically nest within the program.
                     61: References to objects shared between separately compiled files
                     62: are allowed if the objects are declared in
                     63: .Ic included
                     64: header files, whose names must end with
                     65: .Pa \&.h .
                     66: Header files may only be included at the outermost level,
                     67: and thus declare only globally available objects.
                     68: To allow
                     69: .Cx Ic function
                     70: .Cx s
                     71: .Cx
                     72: and
                     73: .Cx Ic procedure
                     74: .Cx s
                     75: .Cx
                     76: to be declared, an
                     77: .Ic external
                     78: directive has been added, whose use is similar to the
                     79: .Ic forward
                     80: directive but restricted to appear only in
                     81: .Pa \&.h
                     82: files.
                     83: .Ic Function
                     84: and
                     85: .Ic procedure
                     86: bodies may not appear in
                     87: .Pa \&.h
                     88: files.
                     89: A binding phase of the compiler checks that declarations
                     90: are used consistently, to enforce the type checking rules of Pascal.
                     91: .Pp
                     92: Object files
                     93: created by other language processors may be loaded together with
                     94: object files created by
                     95: .Nm pc  .
                     96: The
                     97: .Cx Ic function
                     98: .Cx s
                     99: .Cx
                    100: and
                    101: .Cx Ic procedure
                    102: .Cx s
                    103: .Cx
                    104: they define must have been declared
                    105: in
                    106: .Pa \&.h
                    107: files included by all the
                    108: .Pa \&.p
                    109: files which call those
                    110: routines.
                    111: Calling conventions are as in C,
                    112: with
                    113: .Ic var
                    114: parameters passed by address.
                    115: .Pp
                    116: See the Berkeley Pascal User's Manual for details.
                    117: .Pp
                    118: The following options have the same meaning as in
                    119: .Xr cc  1
                    120: and
                    121: .Xr f77  1  .
                    122: See
                    123: .Xr ld  1
                    124: for load-time options.
                    125: .Tw Fl
                    126: .Tp Fl c
                    127: Suppress loading and produce `.o' file(s) from source file(s).
                    128: .Tp Fl g
                    129: Have the compiler produce additional symbol table information for
                    130: .Xr dbx  1  .
                    131: .Tp Fl w
                    132: Suppress warning messages.
                    133: .Tp Fl p
                    134: Prepare object files for profiling, see
                    135: .Xr prof  1  .
                    136: .Tp Fl O
                    137: Invoke an
                    138: object-code improver.
                    139: .Tp Fl S
                    140: Compile the named program, and leave the
                    141: assembler-language output on the corresponding file suffixed `.s'.
                    142: (No `.o' is created.).
                    143: .Tp Cx Fl o
                    144: .Ws
                    145: .Ar output
                    146: .Cx
                    147: Name the final output file
                    148: .Ar output
                    149: instead of
                    150: .Pa a.out .
                    151: .Tp
                    152: .Pp
                    153: The following options are peculiar to
                    154: .Nm pc  .
                    155: .Tw Fl
                    156: .Tp Fl C
                    157: Compile code to perform runtime checks,
                    158: verify
                    159: .Ic assert
                    160: calls,
                    161: and initialize all variables to zero as in
                    162: .Nm pi  .
                    163: .Tp Fl b
                    164: Block buffer the file
                    165: .Ar output .
                    166: .Tp Fl i
                    167: Produce a listing for
                    168: the specified procedures, functions and
                    169: .Ar include
                    170: files.
                    171: .Tp Fl l
                    172: Make a program listing during translation.
                    173: .Tp Fl s
                    174: Accept standard Pascal only;
                    175: non-standard constructs cause warning diagnostics.
                    176: .Tp Cx Fl t
                    177: .Ws
                    178: .Ar directory
                    179: .Cx
                    180: Use the given
                    181: .Ar directory
                    182: for compiler temporary files.
                    183: .Tp Fl z
                    184: Allow execution profiling with
                    185: .Nm pxp
                    186: by generating statement counters, and arranging for the
                    187: creation of the profile data file
                    188: .Pa pmon.out
                    189: when the resulting object is executed.
                    190: .Pp
                    191: .Tp
                    192: Other arguments
                    193: are taken
                    194: to be loader option arguments,
                    195: perhaps libraries of
                    196: .Nm pc
                    197: compatible routines.
                    198: Certain flags can also be controlled in comments within the program
                    199: as described in the
                    200: .Em "Berkeley Pascal User's Manual."
                    201: .Sh FILES
                    202: .Dw /usr/lib.pc2.*strings
                    203: .Di L
                    204: .Dp Pa file.p
                    205: pascal source files
                    206: .Dp Pa /usr/lib/pc0
                    207: compiler
                    208: .Dp Pa /lib/f1
                    209: code generator
                    210: .Dp Pa /usr/lib/pc2
                    211: runtime integrator (inline expander)
                    212: .Dp Pa /lib/c2
                    213: peephole optimizer
                    214: .Dp Pa /usr/lib/pc3
                    215: separate compilation consistency checker
                    216: .Dp Pa /usr/lib/pc2.*strings
                    217: text of the error messages
                    218: .Dp Pa /usr/lib/how_pc
                    219: basic usage explanation
                    220: .Dp Pa /usr/lib/libpc.a
                    221: intrinsic functions and I/O library
                    222: .Dp Pa /usr/lib/libm.a
                    223: math library
                    224: .Dp Pa /lib/libc.a
                    225: standard library, see
                    226: .Xr intro 3
                    227: .Dp
                    228: .Sh SEE ALSO
                    229: .Em Berkeley Pascal User's Manual
                    230: .br
                    231: .Xr pi 1 ,
                    232: .Xr pxp 1 ,
                    233: .Xr pxref 1 ,
                    234: .\" .Xr sdb 1
                    235: .Sh HISTORY
                    236: .Nm Pc
                    237: appeared in 4.0 BSD.
                    238: .Sh DIAGNOSTICS
                    239: For a basic explanation do
                    240: .Pp
                    241: .Df I
                    242: .Nm pc
                    243: .De 
                    244: .Pp
                    245: See
                    246: .Xr pi  1  .
                    247: for an explanation of the error message format.
                    248: Internal errors cause messages containing the word SNARK.
                    249: .Sh AUTHORS
                    250: Charles B. Haley, William N. Joy, and Ken Thompson
                    251: .br
                    252: Retargetted to the second pass of the portable
                    253: .Ar C
                    254: compiler by Peter Kessler
                    255: .br
                    256: Runtime library and inline optimizer by M. Kirk McKusick
                    257: .br
                    258: Separate compilation consistency checking by Louise Madrid
                    259: .Sh BUGS
                    260: The keyword
                    261: .Ic packed
                    262: is recognized but has no effect.
                    263: .Pp
                    264: The binder is not as strict as described here,
                    265: with regard to the rules about external declarations only
                    266: in `.h' files and including `.h' files only at the outermost level.
                    267: It will be made to perform these checks in its next incarnation,
                    268: so users are warned not to be sloppy.
                    269: .Pp
                    270: The
                    271: .Fl z
                    272: flag doesn't work for separately compiled files.
                    273: .Pp
                    274: Because the
                    275: .Fl s
                    276: option is usurped by the compiler,
                    277: it is not possible to pass the strip option to the loader.
                    278: Thus programs which are to be stripped, must be run through
                    279: .Xr strip  1
                    280: after they are compiled.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.