3 ms·
Some related goodness from Forth: there's another word, :NONAME, for defining anonymous words. [0][1] The more common : word enters the newly defined word into
by MaxBarraclough 3y ago
Some related goodness from Forth: there's another word, :NONAME, for defining anonymous words. [0][1]
The more common : word enters the newly defined word into the dictionary, which is Forth speak for the newly defined word now being considered 'in scope'. The :NONAME word instead returns an execution token on the stack, which is analogous to a function pointer.
See also [2], on Forth's execution model more broadly.
[0] https://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Anonymous-Definitions.html https://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Ano...
[1] http://lars.nocrew.org/forth2012/core/ColonNONAME.html http://lars.nocrew.org/forth2012/core/ColonNONAME.html
[2] https://www.forth.com/starting-forth/9-forth-execution/ https://www.forth.com/starting-forth/9-forth-execution/