In Algol-like languages like Pascal and Algol W, all of the environments that exist at any point during a computation can be collectively represented using a stack. This representation for evironments is particularly advantageous because the enviroment stack can be implemented as an elaboration of the control stack embedded in the architecture of a modern computer to support procedure calls. Almost all modern computers use a stack to store the return addresses of procedure calls.
Some machines also pass argument values to procedures in the stack.
The argument values are pushed on the stack along with the return address and the saved context information. The result returned by a procedure is typically returned in a register because the stack frame associated with the call is deallocated on return. In the absence of tail-call optimization which converts procedure calls to jumps, every procedure call allocates a new stack frame. Hence a recursive procedure may allocate a large number of stack frames. In the course of an computation, an exceptional condition may be encountered that requires abandoning a subcomputation.