immediate ( -- )
published: 8 January 2022 / updated 2 December 2023
vocabulary: forth
Make the most recent definition an immediate word.
Sets the compile-only lexicon bit in the name field of the new word just compiled. When the interpreter encounters a word with this bit set, it will not execute this word, but spit out an error message. This bit prevents structure words to be executed accidentally outside of a compound word.
Example:
: myWord
." *** HELLO ***" ; immediate
: myTest
myWord
." *** TEST *** ;
\ display: *** HELLO *** during compilation of myTest
myTest \ display: *** TEST ***
Legal: site web personnel sans commerce / personal site without seling
