Removes and returns the value at the top of an SRP Stack.
Syntax
Value = SRP_Stack("Pop", Handle)
Returns
The value at the top of the stack.
Parameters
| Parameter | Description |
|---|---|
| Handle | Handle to an existing SRP Stack (REQUIRED) |
Remarks
The Peek service gets the value at the top of the stack and removes it.
Examples
// Create the stack
Handle = SRP_Stack("Create")
// Add values
SRP_Stack("Push", Handle, "ABC")
SRP_Stack("Push", Handle, "DEF")
SRP_Stack("Push", Handle, "EFG")
// Always pop in reverse order
Value1 = SRP_Stack("Pop", Handle)
Value2 = SRP_Stack("Pop", Handle)
Value3 = SRP_Stack("Pop", Handle)
// Play nice with memory
SRP_Stack("Release", Handle)