CreateStack

Синтаксис

native Stack:CreateStack(blocksize = 1);

Употреба

blocksize
The number of cells each entry in the stack can hold

Описание

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

Забележка

Stacks provide only two operations: Push (adding an item to the top)
and Pop (remove an item from the top, 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 str_to_num()!

Забележка

The "blocksize" determines how many cells each stack slot has, it can
not be changed after creation.

Връщаща стойност

New stack Handle, which must be freed via DestroyStack()

Грешка

If an invalid blocksize is provided an error will be
thrown.