Dollar Format

Mark Smith mark at maseurope.net
Mon Feb 12 09:58:45 EST 2007


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




More information about the use-livecode mailing list