Handbook
Glossary
Symbols
Factor handbook
»
The language
»
Words
Prev:
Colon definitions
Next:
Word aliasing
A symbol pushes itself on the stack when executed. By convention, symbols are used as variable names (
Dynamic variables
).
symbol
symbol?
( object -- ? )
Defining symbols at parse time:
SYMBOL:
SYMBOLS:
Defining symbols at run time:
define-symbol
( word -- )
Symbols are just compound definitions in disguise. The following two lines are equivalent:
SYMBOL: foo : foo ( -- value ) \ foo ;