5
The program unit,
defvar_prog.p
The module unit, defvar_mod.p,
which makes global public using
the define attribute
82
Using the
Variable Attribute
define
This example makes global public using the define attribute of the variable
declaration.
program defvar_prog;
var
global: extern integer;
procedure proc;
external;
begin
global := 1;
writeln('From MAIN, before PROC: ', global);
proc;
writeln('From MAIN,
end. { defvar_prog }
module defvar_mod;
var
global : define integer;
procedure proc;
begin
writeln('From PROC
global := global + 1;
end; { proc }
Pascal 4.0 User's Guide
after PROC: ', global);
: ',global);
Need help?
Do you have a question about the SunSoft Pascal 4.0 and is the answer not in the manual?
Questions and answers