formatting, format numbers with C locale and document that it's english only
parent
13ba081ac8
commit
cac9b58f11
|
@ -139,7 +139,7 @@ HELP: strftime
|
|||
} ;
|
||||
|
||||
ARTICLE: "formatting" "Formatted printing"
|
||||
"The " { $vocab-link "formatting" } " vocabulary is used for formatted printing."
|
||||
"The " { $vocab-link "formatting" } " vocabulary is used for english formatted printing."
|
||||
{ $subsections
|
||||
printf
|
||||
sprintf
|
||||
|
|
|
@ -30,7 +30,7 @@ IN: formatting
|
|||
[ 0 ] [ string>number ] if-empty ;
|
||||
|
||||
: format-simple ( x digits string -- string )
|
||||
[ >float "" -1 ] 2dip "" format-float ;
|
||||
[ >float "" -1 ] 2dip "C" format-float ;
|
||||
|
||||
: format-scientific ( x digits -- string ) "e" format-simple ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue