home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
pascal
/
library
/
dos
/
sampler
/
04
/
diverse
/
pushpop.pas
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Pascal/Delphi Source File
|
1988-04-12
|
317 b
|
24 lines
PROGRAM PushPop;
CONST
Levels = 5;
VAR
Depth : Integer;
PROCEDURE Dive(VAR Depth : Integer);
BEGIN
Writeln('Push!');
Writeln('Our depth is now: ',Depth);
Depth := Depth +1;
IF Depth <= Levels THEN Dive(Depth);
Writeln('Pop!')
END;
BEGIN
Depth := 1;
Dive(Depth);
END.