System.Generics.Collections.TStack.Pop
Delphi
function Pop: T; inline;
C++
T __fastcall Pop();
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Generics.Collections.pas System.Generics.Collections.hpp |
System.Generics.Collections | TStack |
Description
Pop stack item.
This method removes one item from the top of the stack and returns it. Count is decremented by 1. If Count is already 0, an error is raised.
An OnNotify event occurs indicating an item was removed from the stack. Pop is the same as Extract except for the event code indicating an element was removed rather than extracted.
Pop functions similarly to Peek except that Pop removes an element from the stack.
This is a O(1) operation.
See Also
Code Examples