 |
chamenas Wizard

Joined: 26 Mar 2008 Posts: 1547
|
Posted: Sat Jun 26, 2010 7:42 am
%format |
From this link
I don't see an option to give a number commas without giving it decimals at the end as well. Why is that? I'd like to format my numbers to be like so:
1,000
13,000
etc...
without having to worry about trying to cut off a:
1,000.00
.00 at the end. |
|
|
 |
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Sat Jun 26, 2010 1:51 pm |
#SHOW %format("&.0n",1000)
#SHOW %format("&.0n",13000)
It is there in the documentation. It just isn't that plain in the example given. |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
 |
chamenas Wizard

Joined: 26 Mar 2008 Posts: 1547
|
Posted: Sat Jun 26, 2010 2:09 pm |
Thanks, Arminas. So would I need to use a .0 in there to tell it to NOT use decimals?
|
|
|
 |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Sun Jun 27, 2010 6:40 pm |
Because .0 is telling it to use 0 places after the decimal. The default is to use 2 places after the decimal, I believe. That is not unusual in programming languages.
|
|
|
 |
|
|