Content deleted Content added
→Overview: Updated description of forth’s stack as implicit rather than explicit. The stack is never mentioned by name in the source code, it is part of the model of operation that the programmer is assumed to understand. Tags: Mobile edit Mobile web edit |
m →Overview: formatting fix |
||
Line 61:
Forth emphasizes the use of small, simple functions called ''words''. Words for bigger tasks call upon many smaller words that each accomplish a distinct sub-task. A large Forth program is a hierarchy of words. These words, being distinct modules that communicate implicitly via a stack mechanism, can be prototyped, built and tested independently. The highest level of Forth code may resemble an English-language description of the application. Forth has been called a ''meta-application language'': a language that can be used to create [[Domain-specific language|problem-oriented languages]].<ref>{{cite book |last=Brodie |first=Leo |title=Starting Forth |edition=2nd |year=1987 |publisher=Prentice-Hall |isbn=978-0-13-843079-5 |url=https://www.forth.com/starting-forth/index.html}}</ref>
Forth relies on implicit use of a [[stack (abstract data
Using RPN, one can get the result of the mathematical expression <code>(25 * 10 + 50)</code> this way:
|