Avoid dividing by zero errors
Posted: Tue Jul 02, 2013 7:54 pm
Hi all,
Any quick workarounds to tell Livecode that, if the divided value of two numbers is 0, to put "0" or some kind of placeholder into that particular cell?
In the past, I've essentially done a workaround such as:
...but that can get cumbersome if you have lots and lots of values.
Any quick workarounds to tell Livecode that, if the divided value of two numbers is 0, to put "0" or some kind of placeholder into that particular cell?
In the past, I've essentially done a workaround such as:
Code: Select all
if value = 0 then
put "999999999999999" into var
else
put (var1/var2) into var
end if