Garry's Mod Wiki

Stack

An object returned by util.Stack.

Like a Lua table, a Stack is a container. It follows the principle of LIFO (last in, first out).

The Stack works like a stack of papers: the first page you put down (push) will be the last one you remove (pop). That also means that the last page you put down, will be the first to be removed.

Methods

Stack:Pop( number amount = 1 )
Pop an item from the stack
Stack:Push( any object )
Push an item onto the stack
number Stack:Size()
Returns the size of the stack
any Stack:Top()
Get the item at the top of the stack

Page Links


Special Pages


Wikis

?

Render Time: 24ms

DB GetPage 4
Generate Html 2
SaveChanges (1) 8
Render Body 0
Render Sidebar 8