stack#
Variables#
Constructors#
Functions#
Variable descriptions#
The size of the stack, given as a LONG. This means that a stack with 5
items will have a size of 5L
.
Returns true if the stack cannot hold any more elements.
Constructor descriptions#
Function descriptions#
De-allocates this stack
pointer, so that itsβ pointer ID may be
re-used. You may only have a limited number of stack pointers active at a
time; freeing them when you are done with them helps not reach the limit.
Warning
Deprecated! Free() no longer does anything as of ZC 3.0. Objects are now freed automatically.
Grants βOwnershipβ of the stack pointer to the script that calls this function. When the script with βOwnershipβ terminates (at the same time itsβ local arrays are deallocated), this stack pointer will automatically be βFree()βd.
Removes every element from the stack.
void PushBack(untyped val) π Source
Pushes the given value to the back or front of the stack.
If the stack is at max capacity, does nothing.
void PushFront(untyped val) π Source
Pushes the given value to the back or front of the stack.
If the stack is at max capacity, does nothing.
Removes the back or front element of the stack, and returns it.
If the stack is empty, 0
is returned.
untyped PopFront() π Source
Removes the back or front element of the stack, and returns it.
If the stack is empty, 0
is returned.
untyped PeekBack() π Source
Returns the back or front element of the stack, without removing it.
If the stack is empty, 0
is returned.
untyped PeekFront() π Source
Returns the back or front element of the stack, without removing it.
If the stack is empty, 0
is returned.
untyped Get(long ind) π Source
Returns the element at the index βindβ, which is a LONG value. This means
that 0L
is the first element, 1L
is the second, etc.
void Set(long ind, untyped val) π Source
Overwrites the element at the index βindβ (which is a LONG value) with
βvalβ. This means that 0L
is the first element, 1L
is the second,
etc.