stack.create

Syntax stack.create ()

Params None.

Action Creates a new "last-in-first-out" stack with no elements in it.

Returns The address of the newly allocated stack object.

Examples scratchpad.nameStack = stack.create ()

   » "user.stack.pool.stack001"

Notes All stacks are created in a table at user.stack.pool.

A stack is a table with two items: top indicates how many elements are currently in the stack; vals is a sub-table that stores the stack values.

See Also stack.push

stack.pop

stack.dispose

stack.visit

Discuss