Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
Value = SRP_Stack("Pop", Handle)

Returns

The value at the top of the stack.

Parameters

ParameterDescription
HandleHandle to an existing SRP Stack (REQUIRED)

Remarks

The Peek service gets the value at the top of the stack and removes it.

Examples

Code Block
// 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)

...