Class are destined to control stack arbitrary data.
StackNew() --> new Stack object
st := StackNew() st:push("Some value") // --> 1 st:push(123) // --> 2 ? st:Len() // -->2 ? st:pop() // 123 ? st:Len() // --> 1 st:Free() // --> .T. ? st:Len() // --> 0
No dependies of platform.
Free stack.
Free() --> .t.
No arguments
Always returns TRUE.
Free() is removed all elements from stack.
Get stack length.
Len() --> nLenStack
No arguments
Returns a numeric value - elements count of stack.
Len() is return elements count of stack.
Get last pushed data.
Pop() --> vData
No arguments
Returns a last pushed element.
Pop() is return last pushed data in to stack. If stack has no elements function return NIL
Push data to the stack.
Push(<vData>) --> nLenStack
Returns numeric value is a number pushed element in to stack.
Push() is inserted arbitrary data to the end of stack.
STACK object constructor.
StackNew() --> new Stack object
No arguments
Method returns new STACK object.
StackNew() is constructs and returns new stack object. That class can be used to storage, access, control arbitrary data.