empty is zero
Scott Morrow
scott at elementarysoftware.com
Thu Jul 9 16:18:19 EDT 2009
I'm having trouble with a script where an empty parameter is evaluated
as being zero. I've only been using rev 3.5 a short while so maybe
I've missed a setting or new feature?
In the message box all works as expected:
put empty into tVariable
put charToNum(tVariable) --> (empty)
put isNumber(tVariable) --> false
put tVariable is zero --> false
but in my script, when the parameter is empty I get:
on tHandler tParam -- where tParam is empty
put charToNum(tParam) --> (empty)
put isNumber(tParam) --> false
put tParam is zero --> true
end tHandler
if I explicitly < put empty into tParam > inside the script then
all works as expected
I've not had a lot of sleep but hoped coffee and a maple bar might
compensate.
Scott Morrow
Elementary Software
(Now with 20% less chalk dust!)
web http://elementarysoftware.com/
email scott at elementarysoftware.com
More information about the use-livecode
mailing list