Small Basic Reference Documentation: Stack Object
Small Basic: Reference Documentation > Stack
http://smallbasic.com/img/object_32.png
Stack
This object provides a way of storing values just like stacking up a plate. You can push a value to the top of the stack and pop it off. You can only pop the values one by one off the stack and the last pushed value will be the first one to pop out.
Operations
http://smallbasic.com/img/method_16.png PushValue
Stack.PushValue(stackName, value)
Pushes a value to the specified stack.
stackName
The name of the stack.
value
The value to push.
Returns
Nothing
http://smallbasic.com/img/method_16.png GetCount
Stack.GetCount(stackName)
Gets the count of items in the specified stack.
stackName
The name of the stack.
Returns
The number of items in the specified stack.
http://smallbasic.com/img/method_16.png PopValue
Stack.PopValue(stackName)
Pops the value from the specified stack.
stackName
The name of the stack.
Returns
The value from the stack.
See Also
- Small Basic: Reference Documentation
- The Developer’s Reference Guide to Small Basic
- Wiki: Small Basic Portal