Commatizing numbers: Difference between revisions
m
minor corrections
(→{{header|REXX}}: corrected the "spacing" of pi (period 5).) |
Walterpachl (talk | contribs) m (minor corrections) |
||
Line 22:
Leading zeroes are never commatized. the string 0000000005714.882 after commatization is: 0000000005,714.882
Any period in a number is
The original string is never changed except by the addition of commas (or whatever is used for insertion), if at all.
Line 28:
Leading signs ('''+''', '''-''') are to be preserved (even superfluous signs).
Leading/trailing/imbedded blanks, tabs, and other whitespace are to be preserved.
The case (upper/lower) of the exponent indicator is to be preserved.
Any exponent character(s) should be supported:
Line 46:
Numbers may be terminated with any non-digit character, including subscripts and/or superscript. 4142135624² or 7320509076<sub>(24)</sub>.
The character(s) to be used for the comma can be specified, and may contain blanks, tabs, and other whitespace characters, as well as multiple characters. The default is the comma (''',''')
character.
Line 52:
default period length is 3.
The location of where to start the scanning for the target field (the numeric part) should be able to be specified. The default is 1 (one).
Line 67:
::::* ===US$0017440 millions=== (in 2000 dollars)
::::* 123.e8000 is pretty big.
::::* The land area of the earth is 57268900(29% of the surface)
::::* Ain't no numbers in this here words, nohow, no way, Jose.
::::* James was never known as 0000000007
|