home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
GLEN
/
VOL10N22.ZIP
/
STATIC.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-11-25
|
559b
|
32 lines
STATIC.PAS
COMPLETE LISTING
PROGRAM TestStaticVariables;
CONST Limit = 10;
PROCEDURE Proc1;
CONST Counter : Integer = 0;
BEGIN
Inc(Counter);
IF Counter > Limit THEN Halt;
WriteLn('First Counter :', Counter:5);
END; { Proc1 }
PROCEDURE Proc2;
CONST Counter : Integer = 0;
BEGIN
Inc(Counter);
IF Counter > Limit THEN Halt;
WriteLn('Second Counter :', Counter:5);
END; { Proc2 }
BEGIN
WHILE True DO
BEGIN
Proc1;
Proc2;
END;
END. { TestStaticVariables }