|
AtmaWeapon Newbie
Joined: 07 Apr 2003 Posts: 9 Location: USA
|
Posted: Tue Apr 08, 2003 6:53 am
Number conversion |
Sorry I keep bugging you guys, but is there a way to easily convert numbers from the format with commas in it to the format with just numbers in it and back? I figure there isn't and it can be done, but I thought I'd ask just in case.
|
|
|
|
Wrudyn Novice
Joined: 24 Mar 2003 Posts: 44 Location: USA
|
Posted: Tue Apr 08, 2003 9:44 am |
%replace(number, ",", "")
Removes all commas from a number.
%format("&0.0n", number)
Adds commas to a number. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Tue Apr 08, 2003 10:20 pm |
quote:
Sorry I keep bugging you guys, but is there a way to easily convert numbers from the format with commas in it to the format with just numbers in it and back? I figure there isn't and it can be done, but I thought I'd ask just in case.
If you are capturing a comma-delimited number, you can simply use %n instead of %d to match. %n even goes the extra mile by removing the commas from the variable it's stored in.
li'l shmoe of Dragon's Gate MUD |
|
|
|
|
|