Stack
From Esolang
A stack is a data structure often used as an esoteric programming language's memory. The number of stacks may vary. Many languages have other methods of data storing as well.
A stack works by the principle of Last In, First Out (LIFO). What is pushed onto the stack first, will be popped off last. Often popping an empty stack causes an error or returns zero.
Here are some examples of esoteric programming languages using stacks:
- Befunge uses one stack, which is not the only way to store data (the other is to make the program modify it's own source, stored in the memory of the interpreter during execution).
- False uses a stack for parameters and a return stack for function calls, like Forth.
- Kipple uses many stacks, and that's its only way to store data.
- Stacking uses two stacks, as well as a memory pool.
It can be shown that two (unbounded) stacks are equivalent to an unbounded memory tape and therefore that a programming language with at least two stacks is Turing-complete, provided it has a suitable semantics for manipulating stack values.
See Category:Stack-based for more stack-based esolangs.

