Class Module
24 Members
Stack Class
Entisoft Tools 2.0 Object Library · Stack · 14 Functions · 6 Properties · 3 Subroutines
Declarations
Declarations
Stack Data Structure Copyright 1998 Entisoft
Section
Count
Count
Returns the number of items in the Stack .
Property
IsEmpty
Is Empty
Return True if the Stack is empty. Return False if the Stack contains one or more items.
Property
Item
Item
"Get Nth From Bottom" Return the value of the Nth item from the bottom of the stack, The item at the bottom of the stack is numbered 1 (one).
Property
Name
Name
Assign a Name to this Stack .
Property
NthFromTop
Nth From Top
Return the value of the Nth item from the top of the stack, The item at the top of the stack is numbered 1 (one).
Property
Tag
Tag
Assign a Tag to this Stack . The Tag can be any type of Data.
Property
Drop
Drop
Drop N items from the top of the stack. Function returns True upon success and False upon failure.
Function
Duplicate
Duplicate
Duplicate the top N values on the stack. Function returns True upon success and False upon failure.
Function
Over
Over
Duplicate the value that is second from (next to) the top of the stack. Function returns True upon success and False upon failure.
Function
Peek
Peek
Copy the value on the top of the stack into rValue, without removing that value from the stack. Function returns true upon success.
Function
Pick
Pick
Pushes a copy of the Nth element from the top of the stack. Function returns True upon success and False upon failure.
Function
Pop
Pop
Pop the value off the top of the stack and copy the value into rValue. Function returns True upon success and False upon failure.
Function
PopMulti
Pop Multi
Pop one or more values off the top of the stack. Values are popped off the stack are assigned to the arguments from left-to-right. The top of the stack is assigned to the leftmost argument.
Function
Remove
Remove
Remove the value on the top of the stack (if vElement is 0), or remove the Nth element from the bottom of the stack (if vElement is >0). Return True upon success and False upon failure.
Function
Reverse
Reverse
Reverse the positions of the N items at the top of the stack. Function returns True upon success and False upon failure.
Function
RollDown
Roll Down
Roll the top N stack items down towards the stack bottom. Item previously at position Top - N + 1 ends up on the top of the stack. Function returns True upon success and False upon failure.
Function
RollUp
Roll Up
Roll the top N stack items up towards the stack top. Item previously on the top of the stack ends up at position Top - N + 1. Function returns True upon success and False upon failure.
Function
Rotate
Rotate
Rotate down the top THREE items on the stack. Item previously at position Top - 2 ends up on the top of the stack. Function returns True upon success and False upon failure.
Function
StringView
String View
Return a copy of all of the stack items in the form of a string. Return value is prefixed by vPrefix and followed by vSuffix. Stack items are separated by vSeparator in the result string.
Function
Swap
Swap
Swap the two values on the top of a stack. Function returns True upon success and False upon failure.
Function
Push
Push
Push a new value onto the top of the stack.
Sub
PushMulti
Push Multi
Push one or more values onto the top of the stack. Argument values are pushed onto the stack in order from left to right. The last argument ends up on the top of the stack.
Sub
RemoveAll
Remove All
Remove all of the items from the Stack .
Sub