CreateStack Function

Creates a stack structure. A stack is a LIFO (last in, first out) vector (array) of items. It has O(1) insertion and O(1) removal.

Stacks have two operations: Push (adding an item) and Pop (removes items in reverse-push order).

The contents of the stack are uniform; i.e. storing a string and then retrieving it as an integer is NOT the same as StringToInt()!

The "blocksize" determines how many cells each slot has; it cannot be changed after creation.

ArrayStack CreateStack(int blocksize)


int blocksize

The number of cells each entry in the stack can hold. For example, 32 cells is equivalent to: new Array[X][32]

Return Value

New stack Handle.