Hi Scott,

If you check empty = 0, you'll get false, but if empty*1 = 0 will return true. AFAIK it has always been like this. I assume that tParam gets parsed when it is passed to a function or command handler. You can change the offending line of your script into: "put tParam is zero and tParam is not empty"

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
Snapper Screen Recorder 2.1 http://snapper.economy-x-talk.com

If you sent me an e-mail before 21 June and haven't got a reply yet, please send me a reminder.






On 9 jul 2009, at 22:18, Scott Morrow wrote:

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

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to