Unicode result and booleans

Sarah Reichelt sarah.reichelt at gmail.com
Sat Apr 1 20:38:51 EST 2006


> I am having a problem with the result of a VBscript script. I think
> it returns a Unicode result.
> It is 0 for true and -1 for false
>
> I have a switch case to check which and change it to true/false
> instead of 0 -1.
>

WIth only 2 possibilites, how about:

put the result into tResult
if tResult contains "0" then
  put false into tResult
esle
  put true into tResult
end if

I only use "switch" if there are lots of options - with only 2 I find
"if - then - else" easier and it allows for vaguer comparisions like
this.

HTH,
Sarah



More information about the use-livecode mailing list