From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function Extract: T; inline;


T __fastcall Extract(void);


Type Visibility Source Unit Parent
function public
System.Generics.Collections TStack


Remove top stack item.

Extract removes and returns the top element of the stack. 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. Extract is the same as Pop except for the event code indicating an element was extracted rather than removed.

Extract functions similarly to Peek except that Extract removes an element from the stack.

Extract is similar to Pop and is provided so items may be removed without freeing.

This is a O(1) operation.

See Also

Code Examples