DEFER:
Factor handbook » The language » Words » Deferred words and mutual recursion

Next:deferred


Vocabulary
syntax

Syntax
DEFER: word


Inputs
None

Outputs
None

Word description
Create a word in the current vocabulary that simply raises an error when executed. Usually, the word will be replaced with a real definition later.

Notes
Due to the way the parser works, words cannot be referenced before they are defined; that is, source files must order definitions in a strictly bottom-up fashion. Mutually-recursive pairs of words can be implemented by deferring one of the words in the pair allowing the second word in the pair to parse, then by defining the first word.

Examples
DEFER: foe : fie ... foe ... ; : foe ... fie ... ;


See also
deferred

Definition