document number-base prettyprinter variable. add more docs about hex float syntax
parent
ceff1b40be
commit
238f600da2
|
@ -19,6 +19,9 @@ HELP: length-limit
|
|||
HELP: line-limit
|
||||
{ $var-description "The maximum number of lines output by the prettyprinter before output is truncated with \"...\". The default is " { $link f } ", denoting unlimited line count." } ;
|
||||
|
||||
HELP: number-base
|
||||
{ $var-description "The number base in which the prettyprinter will output numeric literals. A value of " { $snippet "2" } " will print integers and ratios in binary with " { $link POSTPONE: BIN: } ", and " { $snippet "8" } " will print them in octal with " { $link POSTPONE: OCT: } ". A value of " { $snippet "16" } " will print all integers, ratios, and floating-point values in hexadecimal with " { $link POSTPONE: HEX: } ". Other values of " { $snippet "number-base" } " will print numbers in decimal, which is the default." } ;
|
||||
|
||||
HELP: string-limit?
|
||||
{ $var-description "Toggles whether printed strings are truncated to the margin." } ;
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ ARTICLE: "prettyprint-variables" "Prettyprint control variables"
|
|||
{ $subsection nesting-limit }
|
||||
{ $subsection length-limit }
|
||||
{ $subsection line-limit }
|
||||
{ $subsection number-base }
|
||||
{ $subsection string-limit? }
|
||||
{ $subsection boa-tuples? }
|
||||
{ $subsection c-object-pointers? }
|
||||
|
@ -202,8 +203,8 @@ HELP: .o
|
|||
{ $description "Outputs an integer in octal." } ;
|
||||
|
||||
HELP: .h
|
||||
{ $values { "n" "an integer" } }
|
||||
{ $description "Outputs an integer in hexadecimal." } ;
|
||||
{ $values { "n" "an integer or floating-point value" } }
|
||||
{ $description "Outputs an integer or floating-point value in hexadecimal." } ;
|
||||
|
||||
HELP: stack.
|
||||
{ $values { "seq" "a sequence" } }
|
||||
|
|
|
@ -61,7 +61,7 @@ HELP: bin>
|
|||
$nl
|
||||
"Outputs " { $link f } " if the string does not represent a number." } ;
|
||||
|
||||
{ bin> POSTPONE: BIN: bin> .b } related-words
|
||||
{ >bin POSTPONE: BIN: bin> .b } related-words
|
||||
|
||||
HELP: oct>
|
||||
{ $values { "str" string } { "n/f" "a real number or " { $link f } } }
|
||||
|
@ -69,7 +69,7 @@ HELP: oct>
|
|||
$nl
|
||||
"Outputs " { $link f } " if the string does not represent a number." } ;
|
||||
|
||||
{ oct> POSTPONE: OCT: oct> .o } related-words
|
||||
{ >oct POSTPONE: OCT: oct> .o } related-words
|
||||
|
||||
HELP: hex>
|
||||
{ $values { "str" string } { "n/f" "a real number or " { $link f } } }
|
||||
|
@ -77,7 +77,7 @@ HELP: hex>
|
|||
$nl
|
||||
"Outputs " { $link f } " if the string does not represent a number." } ;
|
||||
|
||||
{ hex> POSTPONE: HEX: hex> .h } related-words
|
||||
{ >hex POSTPONE: HEX: hex> .h } related-words
|
||||
|
||||
HELP: >base
|
||||
{ $values { "n" real } { "radix" "an integer between 2 and 36" } { "str" string } }
|
||||
|
|
|
@ -593,10 +593,13 @@ HELP: #!
|
|||
{ $description "Discards all input until the end of the line." } ;
|
||||
|
||||
HELP: HEX:
|
||||
{ $syntax "HEX: integer" }
|
||||
{ $values { "integer" "hexadecimal digits (0-9, a-f, A-F)" } }
|
||||
{ $description "Adds an integer read from a hexadecimal literal to the parse tree." }
|
||||
{ $examples { $example "USE: prettyprint" "HEX: ff ." "255" } } ;
|
||||
{ $syntax "HEX: NNN" "HEX: NNN.NNNpEEE" }
|
||||
{ $values { "N" "hexadecimal digit (0-9, a-f, A-F)" } { "pEEE" "decimal exponent value" } }
|
||||
{ $description "Adds an integer or floating-point value read from a hexadecimal literal to the parse tree." }
|
||||
{ $examples
|
||||
{ $example "USE: prettyprint" "HEX: ff ." "255" }
|
||||
{ $example "USE: prettyprint" "HEX: 1.8p5 ." "48.0" }
|
||||
} ;
|
||||
|
||||
HELP: OCT:
|
||||
{ $syntax "OCT: integer" }
|
||||
|
|
Loading…
Reference in New Issue