/guid/9202a8c04000641f80000000003a8dce rename
Summary
A stack-oriented programming language is one that relies on a stack machine model for passing...
Content
A stack-oriented programming language is one that relies on a stack machine model for passing parameters. Several programming languages fit this description, notably Forth, RPL and PostScript, and also many Assembly languages (but on a much lower level).
Stack oriented programming languages operate upon one or more stacks, each of which may serve different purposes. Because of this, programming constructs in other programming languages may need to be modified for use in a stack-oriented programming language. Adding to this, some stack-oriented programming languages operate in Reverse Polish or postfix notation - that is, the arguments or parameters for some command are stated before the actual command itself. For example, in RPN, one would say "2, 3, multiply" instead of "multiply, 2, 3" (prefix or Polish notation) or "2 multiply 3" (infix notation).
Assume we have a postfix stack based programming language. PostScript is one such real language. To understand how a stack-oriented programming language works, in calculating an expression such as 2 3 mul, we can use a simple thought experiment.
Say you are standing at the end of a conveyor belt (the input), onto which someone has
Created by:
Freebase Data Team
Oct 22, 2006
Last edited by:
Freebase Data Team
Oct 22, 2006
Recent Discussions about None
There is no discussion about this document.
Start the Discussion »