![](/images/backgrounds/286549/hp-sunsoft-pascal-4-0-users-manual-54939594x1.png)
4
You can also separate the compilation and linking or loading steps, as follows:
hostname% pc program_unit.p
In this case, you call pc on each unit with the “compile only” option
Calling the linker or loader ld(1) directly does not have the same effect as calling pc; when you call ld(1) directly, the files are linked and loaded, but they are not checked for conflicts.
Using Units and Header FilesA complex program may have many routines defined in modules. Each routine must have a declaration (for example, procedure proc; extern;) in each file that calls the routine. The easiest way to be sure that you have a correct and consistent set of declarations is to create a header file.
A header file is a file that contains a set of declarations, nothing else. You use a header file by using an include directive to include the header file in the compilation.
For example, here is a modified version of the program, program_unit, that uses a header file:
program program_unit2 (output); include "header.h"
begin
say_hello
end.
In this case, the content of header.h is very simple:
procedure say_hello; extern;
70 | Pascal 4.0 User’s Guide |