xForth
xForth copied to clipboard
DEFER
trafficstars
Add DEFER, IS, ACTION-OF, DEFER@, and DEFER!.
A deferred word should probably compile to a single jump instruction.
IS should work at both compile time and run time.
On second thought, that wouldn't work on machines with read-only or inaccessible program memory.
The problem is similar to VARIABLE : another level of indirection is required. And, of course, initialization.