Versions Compared

Key

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

...

SRP Stacks are simple data structures useful for nested or recursive operations.

MethodDescription
ClearRemoves all values from an SRP Stack.
CreateCreates an SRP Stack.
CountGets the number of elements in the stack.
Peek

Returns the value at the top of an SRP Stack without removing it.

Pop

Removes and returns the value at the top of an SRP Stack.

Push

Inserts a value at the top of an SRP Stack.

ReleaseReleases the handle to an SRP Stack.

...

Code Block
// Put the system variables onto the stack
SRP_Stack("Push", Handle, @Record)
SRP_Stack("Push", Handle, @Dict)
SRP_Stack("Push", Handle, @ID)


// Now we can use them in our own code
Open "SomeTable" to hTable then
	Open "DICT.SomeTable" to @Dict then
		@ID = "SomeKey"
		Read @Record from hTable, @ID then
			// Do stuff
		end
	end
end


// Restore the system variables, but make sure to do it in the correct order
@ID = SRP_Stack("Pop", Handle)
@Dict = SRP_Stack("Pop", Handle)
@Record = SRP_Stack("Pop", Handle)

...