Documentation updates
parent
f850ba5665
commit
128715def4
|
@ -253,12 +253,12 @@ ARTICLE: "handbook-language-reference" "Language reference"
|
||||||
{ $subsection "conventions" }
|
{ $subsection "conventions" }
|
||||||
{ $subsection "syntax" }
|
{ $subsection "syntax" }
|
||||||
{ $subsection "effects" }
|
{ $subsection "effects" }
|
||||||
|
{ $subsection "evaluator" }
|
||||||
"Data types:"
|
"Data types:"
|
||||||
{ $subsection "booleans" }
|
{ $subsection "booleans" }
|
||||||
{ $subsection "numbers" }
|
{ $subsection "numbers" }
|
||||||
{ $subsection "collections" }
|
{ $subsection "collections" }
|
||||||
"Evaluation semantics:"
|
"Evaluation:"
|
||||||
{ $subsection "evaluator" }
|
|
||||||
{ $subsection "words" }
|
{ $subsection "words" }
|
||||||
{ $subsection "shuffle-words" }
|
{ $subsection "shuffle-words" }
|
||||||
{ $subsection "combinators" }
|
{ $subsection "combinators" }
|
||||||
|
|
|
@ -24,6 +24,7 @@ ARTICLE: "wrappers" "Wrappers"
|
||||||
"Wrappers are used to push words on the data stack; they evaluate to the object being wrapped:"
|
"Wrappers are used to push words on the data stack; they evaluate to the object being wrapped:"
|
||||||
{ $subsection wrapper }
|
{ $subsection wrapper }
|
||||||
{ $subsection literalize }
|
{ $subsection literalize }
|
||||||
|
"Wrapper literal syntax is documented in " { $link "syntax-words" } "."
|
||||||
{ $see-also "combinators" } ;
|
{ $see-also "combinators" } ;
|
||||||
|
|
||||||
ABOUT: "quotations"
|
ABOUT: "quotations"
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
USING: help.markup help.syntax words.constant ;
|
||||||
|
IN: words.constant
|
||||||
|
|
||||||
|
ARTICLE: "words.constant" "Constants"
|
||||||
|
"There is a syntax for defining words which push literals on the stack."
|
||||||
|
$nl
|
||||||
|
"Define a new word that pushes a literal on the stack:"
|
||||||
|
{ $subsection POSTPONE: CONSTANT: }
|
||||||
|
"Define an constant at run-time:"
|
||||||
|
{ $subsection define-constant } ;
|
||||||
|
|
||||||
|
ABOUT: "words.constant"
|
|
@ -31,7 +31,7 @@ $nl
|
||||||
{ $subsection define }
|
{ $subsection define }
|
||||||
{ $subsection define-declared }
|
{ $subsection define-declared }
|
||||||
{ $subsection define-inline }
|
{ $subsection define-inline }
|
||||||
"Word definitions should declare their stack effect, unless the definition is completely trivial. See " { $link "effect-declaration" } "."
|
"Word definitions must declare their stack effect. See " { $link "effect-declaration" } "."
|
||||||
$nl
|
$nl
|
||||||
"All other types of word definitions, such as " { $link "words.symbol" } " and " { $link "generic" } ", are just special cases of the above." ;
|
"All other types of word definitions, such as " { $link "words.symbol" } " and " { $link "generic" } ", are just special cases of the above." ;
|
||||||
|
|
||||||
|
@ -75,6 +75,7 @@ ARTICLE: "word-definition" "Defining words"
|
||||||
{ $subsection "colon-definition" }
|
{ $subsection "colon-definition" }
|
||||||
{ $subsection "words.symbol" }
|
{ $subsection "words.symbol" }
|
||||||
{ $subsection "words.alias" }
|
{ $subsection "words.alias" }
|
||||||
|
{ $subsection "words.constant" }
|
||||||
{ $subsection "primitives" }
|
{ $subsection "primitives" }
|
||||||
{ $subsection "deferred" }
|
{ $subsection "deferred" }
|
||||||
{ $subsection "declarations" }
|
{ $subsection "declarations" }
|
||||||
|
|
Loading…
Reference in New Issue