
Separate Compilation 85
5
The program unit, inc_prog2.p program inc_prog2;
%include "include2.h";
procedure proc; extern;
begin
global := 1;
writeln('From MAIN, before PROC: ',global);
proc;
writeln('From MAIN, after PROC: ',global);
end. { proc }
The module unit
, inc_mod2.p module inc_mod2;
define
global;
%include "include2.h";
procedure proc;
begin
writeln('From PROC : ',global);
global := global + 1;
end; { proc }
The include file, include2.h var
global : extern integer;
Komentáře k této Příručce