New Math

Marty Knapp martyknapp at comcast.net
Sat Feb 18 18:39:34 EST 2012


Let's say I have a numeric field and a button to increase the value and 
a button to decrease the value. When I click the increase button, I want 
it to increase to the next highest value that is evenly divisible by 20. 
So if the field has a value of 19, a click will set the value to 20. If 
the field has a value of 121, a click would increase  it to 140.

I know I could do it by adding (or subtracting in the case of a 
decrease) but is there a more elegant and/or faster way to do that?

Thanks,
Marty K




More information about the use-livecode mailing list