Question

When a word is already defined in Forth, is there a way to print its definition?

I've heard that many of Forth's built-in functions such as emit, drop, etc. are defined in terms of the language itself, and I'd like to be able to look at their definitions.

Was it helpful?

Solution

You can usually use

see emit

Which in Gforth gives you something like:

: (emit)
  outfile-id emit-file drop ;
latestxt
Defer emit
IS emit
 ok
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top