Reference TStack<T>
Declared in Codebot.System.pas on line 284
TStack<T> is a fixed size last in first out collection of items. Pushing onto a full stack or popping from an empty stack raises an EStackError.
TStack<T> = record
public
{ Create a stack with room for size items. Size must be at least 1. }
class function Create(Size: Integer): TStack<T>; static;
{ Push a new item on the stack }
procedure Push(const Value: T);
{ Pop an item from the stack }
function Pop: T;
{ IsEmpty is true if index is less than zero }
property IsEmpty: Boolean read GetIsEmpty;
{ Index is the current item on the stack }
property Index: Integer read FIndex;
{ The item with index of zero on the stack }
property First: T read GetFirst write SetFirst;
{ The item with index of index on the stack }
property Last: T read GetLast write SetLast;
end;