numberFormat prop

peter.fink at tiscali.ch peter.fink at tiscali.ch
Wed Jul 10 02:57:01 EDT 2002


>
>Rob,
>
>>> Anybody know how to set the decimal precision of a numeric value? I
have
>>> looked through the docs but I can't seem to find the reference.
>> 
>> Hi Steve,
>> 
>> Did you check the numberFormat property?
>

thats easy, fields do not have a numberFormat property. It works as follows:
  set the numberFormat to "0.00"
  put (numeric expression) into fld "xy"

  set the numberFormat to "0.000"
  add 0 to fld "xy"

  set the numberFormat to "0.0000"
  put fld "xy"+0 into fld "xy"

  set the numberFormat to "0.00000"
  put (numeric expression) & "" into variable

true, at least it worked this way in Hypercard (see p. 442).
Peter









More information about the use-livecode mailing list