Fix more example typos
parent
610c497143
commit
19b52b7eab
|
@ -163,7 +163,7 @@ HELP: monotonic?
|
|||
{ $description "Applies the relation to successive pairs of elements in the sequence, testing for a truth value. The relation should be a transitive relation, such as a total order or an equality relation." }
|
||||
{ $examples
|
||||
"Testing if a sequence is non-decreasing:"
|
||||
{ $example "{ 1 1 2 } [ >= ] monotonic? ." "t" }
|
||||
{ $example "{ 1 1 2 } [ <= ] monotonic? ." "t" }
|
||||
"Testing if a sequence is decreasing:"
|
||||
{ $example "{ 9 8 6 7 } [ < ] monotonic? ." "f" }
|
||||
}
|
||||
|
|
|
@ -34,7 +34,11 @@ $terpri
|
|||
}
|
||||
"You can define a word for invoking it:"
|
||||
{ $example
|
||||
"LIBRARY: foo\nFUNCTION: void the_answer ( char* question, int value ) ;\n\\ the_answer compile\n\"the question\" 42 the-answer" "The answer to the question is 42."
|
||||
"LIBRARY: foo\nFUNCTION: void the_answer ( char* question, int value ) ;"
|
||||
"USE: compiler"
|
||||
"\\ the_answer compile"
|
||||
"\"the question\" 42 the_answer"
|
||||
"The answer to the question is 42."
|
||||
} }
|
||||
{ $notes "Note that the parentheses and commas are only syntax sugar and can be omitted; they serve no purpose other than to make the declaration slightly easier to read:"
|
||||
{ $code
|
||||
|
|
|
@ -16,7 +16,7 @@ HELP: effect>string
|
|||
{ $values { "effect" "a stack effect" } { "string" "a string" } }
|
||||
{ $description "Turns a stack effect object into a string mnemonic." }
|
||||
{ $examples
|
||||
{ $example "1 2 <effect> effect>string print" "( object object -- object )" }
|
||||
{ $example "1 2 <effect> effect>string print" "( object -- object object )" }
|
||||
} ;
|
||||
|
||||
HELP: stack-effect
|
||||
|
|
|
@ -53,7 +53,7 @@ HELP: bad-escape
|
|||
HELP: escape
|
||||
{ $values { "escape" "a single-character escape" } { "ch" "a character" } }
|
||||
{ $description "Converts from a single-character escape code and the corresponding character." }
|
||||
{ $examples { $example "CHAR: n escape CHAR: \n = ." "t" } } ;
|
||||
{ $examples { $example "CHAR: n escape CHAR: \\n = ." "t" } } ;
|
||||
|
||||
HELP: parse-string
|
||||
{ $values { "str" "a new string" } }
|
||||
|
|
|
@ -19,7 +19,7 @@ HELP: gesture>string
|
|||
{ $values { "gesture" "a gesture" } { "string/f" "a " { $link string } " or " { $link f } } }
|
||||
{ $contract "Creates a human-readable string from a gesture object, returning " { $link f } " if the gesture does not have a human-readable form." }
|
||||
{ $examples
|
||||
{ $example "T{ key-down f { C+ } \"x\" } gesture>string print" "C+x" }
|
||||
{ $example "USE: gadgets" "T{ key-down f { C+ } \"x\" } gesture>string print" "C+x" }
|
||||
} ;
|
||||
|
||||
HELP: commands
|
||||
|
|
Loading…
Reference in New Issue