82
Pascal 4.0 User’s Guide
5
Using the
define
Variable Attribute
This example makes
global public
using the define attribute of the variable
declaration.
The program unit,
defvar_prog.p
program defvar_prog;
var
global: extern integer;
procedure proc;
external;
begin
global := 1;
writeln('From MAIN, before PROC: ', global);
proc;
writeln('From MAIN, after PROC: ', global);
end. { defvar_prog }
The module unit,
defvar_mod.p
,
which makes
global
public using
the
define
attribute
module defvar_mod;
var
global : define integer;
procedure proc;
begin
writeln('From PROC : ',global);
global := 1;
end; { proc }
Summary of Contents for SunSoft Pascal 4.0
Page 14: ...xiv Pascal 4 0 User s Guide ...
Page 16: ...xvi Pascal 4 0 User s Guide ...
Page 30: ...6 Pascal 4 0 User s Guide 1 ...
Page 160: ...136 Pascal 4 0 User s Guide 6 ...
Page 268: ...244 Pascal 4 0 User s Guide 11 ...
Page 320: ...296 Pascal 4 0 User s Guide B ...
Page 331: ...Index 307 ...
Page 333: ......