Forth (programming language): Difference between revisions

Content deleted Content added
mNo edit summary
Line 74:
 
[[File:Forthstack1 5.svg|150px|left]]
<br/>The word <code>*</code> takes the top two numbers from the stack, multiplies them, and puts the product back on the stack.{{clear}}
 
[[File:Forthstack2.svg|150px|left]]
Line 80:
 
[[File:Forthstack3.svg|150px|left]]
<br/>The word <code>+</code> adds the top two values, pushing the sum. <code>CR</code> ([[carriage return]]) starts the output on a new line. Finally, <code>.</code> prints the result. As everything has completed successfully, the Forth system prints <code>OK</code>.<ref name="3yqc9">{{harvnb|Brodie|1987|p=20}}</ref>{{clear}}
 
Even Forth's structural features are stack-based. For example:
Line 313:
* [https://littlemanstackmachine.org/firth.html Firth], an adaptation of Forth for the Little Man Stack Machine computer.
* [https://gitlab.com/higaski/Shi Shi], a fast and tiny embeddable Forth implementation written for the Thumb-2 ISA (ARMv7-M and newer).
* [https://en.wikipedia.org/wiki/Actor_[Actor (programming_language)programming language)|Actor Language]], which Ranran on early Windows systems.
 
== See also ==