3

program showinclude; #include "file.i" begin

...

end.

See the man page for cpp(1) for information on its directives and other features. Appendix A, “Pascal Preprocessor,” describes cppas.

File Name Extensions Accepted By pc

Pascal source files generally use the extension .p. The compiler recognizes other file name extensions. Table 3-1 lists the most important extensions.

The table notes that pc can produce assembler source files as well as unlinked object files. In each case, you can pass these partially compiled files to pc, which then finishes the compilation, linking, and loading.

Table 3-1File Name Suffixes Recognized by Pascal

Suffix

Description

 

 

.p

Usual extension for Pascal source files.

 

 

.pas

Valid extension for a Pascal source file. The extension instructs pc

 

to put object files in the current directory. The default name of the

 

object file is the name of the source file, but with a .o suffix.

 

 

.pi

Default extension for Pascal source files that have been processed by

 

the Pascal preprocessor (either cpp or cppas).

 

 

.s

Extension for assembler source files that are produced when you call

 

pc with the -Soption.

 

 

.o

Extension for object files that are generated by the compiler when

 

you call pc with the -coption.

 

 

20

Pascal 4.0 User’s Guide