Adding numbers (and limiting the result)
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.
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:
put fld "Tot0" / fld "Grp0" into fld "Cpp0"
Should the statRound function go here, or in some other place?
Director of Advertising
More information about the Use-livecode