$nl
"All other types of word definitions, such as " { $link "symbols" } " and " { $link "generic" } ", are just special cases of the above." ;
-ARTICLE: "symbols" "Symbols"
-"A symbol pushes itself on the stack when executed. By convention, symbols are used as variable names (" { $link "namespaces" } ")."
-{ $subsection symbol }
-{ $subsection symbol? }
-"Defining symbols at parse time:"
-{ $subsection POSTPONE: SYMBOL: }
-"Defining symbols at run time:"
-{ $subsection define-symbol }
-"Symbols are just compound definitions in disguise. The following two lines are equivalent:"
-{ $code
- "SYMBOL: foo"
- ": foo ( -- value ) \\ foo ;"
-} ;
-
ARTICLE: "primitives" "Primitives"
"Primitives are words defined in the Factor VM. They provide the essential low-level services to the rest of the system."
{ $subsection primitive }
}
"The latter is a more dynamic feature that can be used to implement code generation and such, and in fact parse time defining words are implemented in terms of run time defining words."
{ $subsection "colon-definition" }
-{ $subsection "symbols" }
+{ $subsection "words.symbol" }
+{ $subsection "words.alias" }
{ $subsection "primitives" }
{ $subsection "deferred" }
{ $subsection "declarations" }
HELP: primitive
{ $description "The class of primitive words." } ;
-HELP: symbol
-{ $description "The class of symbols created by " { $link POSTPONE: SYMBOL: } "." } ;
-
HELP: word-prop
{ $values { "word" word } { "name" "a property name" } { "value" "a property value" } }
{ $description "Retrieves a word property. Word property names are conventionally strings." } ;
{ $values { "word" word } { "start" "the word's start address" } { "end" "the word's end address" } }
{ $description "Outputs the machine code address of the word's definition." } ;
-HELP: define-symbol
-{ $values { "word" word } }
-{ $description "Defines the word to push itself on the stack when executed. This is the run time equivalent of " { $link POSTPONE: SYMBOL: } "." }
-{ $notes "This word must be called from inside " { $link with-compilation-unit } "." }
-{ $side-effects "word" } ;
-
HELP: define
{ $values { "word" word } { "def" quotation } }
{ $description "Defines the word to call a quotation when executed. This is the run time equivalent of " { $link POSTPONE: : } "." }