Dollar Format
Jeff Honken
jhonken at webdsp.com
Mon Feb 12 10:20:40 EST 2007
Mark,
That worked great. Thanks, Jeff
-----Original Message-----
From: Mark Smith [mailto:mark at maseurope.net]
Sent: Monday, February 12, 2007 9:59 AM
To: How to use Revolution
Subject: Re: Dollar Format
Jeff, try the format function
put format("%1.2f",NBalance) into NBalance
The numberFormat is a system property, and you can't set it for one
variable. It persists (I think) until the current handler finishes.
In any case, it simply limits the decimal places, and will not put
the trailing zeros in, so if your calculation produced a value of
21.1, it would still only give you "21.1" rather than "21.10".
Best,
Mark
On 12 Feb 2007, at 14:17, Jeff Honken wrote:
> How would a person force a U.S. dollar format on a variable? I'm
> trying
> to set NBalance as a dollar but the following errors:
>
> put pBalance - (iDPayment + DSUM) into NBalance
> set the numberFormat of NBalance to "#.00"
>
> Any help will be greatly appreciated. Jeff
>
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list