home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 February
/
Chip_2000-02_cd.bin
/
zkuste
/
Delphi
/
navody
/
tt
/
objvm.exe
/
UNITS
/
PtrStack.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1998-03-15
|
628b
|
30 lines
unit PtrStack;
interface
uses Classes;
type TPtrStack=class(TList)
procedure Push(a:pointer);
function Pop:pointer;
function Top:pointer;
function IsEmpty:boolean;
end;
implementation
procedure TPtrStack.Push;
begin
Add(a);
end;
function TPtrStack.Pop;
begin
Result:=Top;
Delete(Count-1);
end;
function TPtrStack.Top;
begin
Result:=Items[Count-1];
end;
function TPtrStack.IsEmpty;
begin
Result:=Count=0;
end;
end.