A program may be separated into more than one .p file. Pc will compile a number of argument .p files into object files (with the extension .o in place of .p ) Object files may then be loaded into an executable a.out file. Exactly one object file must supply a 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 included header files, whose names must end with .h Header files may only be included at the outermost level, and thus declare only globally available objects. To allow function s and procedure s to be declared, an external directive has been added, whose use is similar to the forward directive but restricted to appear only in .h files. Function and procedure bodies may not appear in .h files. A binding phase of the compiler checks that declarations are used consistently, to enforce the type checking rules of Pascal.
Object files created by other language processors may be loaded together with object files created by pc The function s and procedure s they define must have been declared in .h files included by all the .p files which call those routines. Calling conventions are as in C, with var parameters passed by address.
See the "Berkeley Pascal User's Manual" for details.
The following options have the same meaning as in cc(1) and f77(1). See ld1 for load-time options.
The following options are peculiar to pc
Other arguments are taken to be loader option arguments, perhaps libraries of pc compatible routines. Certain flags can also be controlled in comments within the program as described in the "Berkeley Pascal User's Manual."
pc
See pi1. for an explanation of the error message format. Internal errors cause messages containing the word SNARK
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.
The -z flag doesn't work for separately compiled files.
Because the -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 strip(1) after they are compiled.