Adding numbers (and limiting the result)

Mike McKenzie mikelmac at mac.com
Fri Dec 14 11:46:01 EST 2001


on 12/11/01 6:30 PM, Sarah Reichelt at sarahr at genesearch.com.au wrote:

> You could use numberFormat as suggested, or the round function.
> 
> put round(myNumber,2) into fld "Whatever"
> 
> This will give you 2 decimal places rounded by financial rules. If you want
> statistical rounding rules, use the statRound function.
> 
> Cheers,
> Sarah

Sarah,

Thanks for the suggestion, however I'm in the dark as to how to use this in
my current script, for example this is the script in the field that
generates the number that needs to be rounded:

on closefield
  put fld "Tot0" / fld "Grp0" into fld "Cpp0"
end closefield

Should the statRound function go here, or in some other place?

Thanks!


Michael McKenzie
Director of Advertising
Ruby-Gordon Inc.






More information about the use-livecode mailing list