formatting, format numbers with C locale and document that it's english only

db4
Jon Harper 2015-07-05 21:53:14 +02:00 committed by John Benediktsson
parent 13ba081ac8
commit cac9b58f11
2 changed files with 2 additions and 2 deletions

View File

@ -139,7 +139,7 @@ HELP: strftime
} ; } ;
ARTICLE: "formatting" "Formatted printing" 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 { $subsections
printf printf
sprintf sprintf

View File

@ -30,7 +30,7 @@ IN: formatting
[ 0 ] [ string>number ] if-empty ; [ 0 ] [ string>number ] if-empty ;
: format-simple ( x digits string -- string ) : 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 ; : format-scientific ( x digits -- string ) "e" format-simple ;