Unicode result and booleans

Thomas McGrath III 3mcgrath at adelphia.net
Sat Apr 1 18:27:02 EST 2006


I thought to try this out but with no luck:

repeat with x = 1 to the num of chars in tResult
     put the uniDecode of char x of tResult after myDeText
end repeat

It might be on the right track????

Tom


On Apr 1, 2006, at 6:21 PM, Thomas McGrath III wrote:

> Hello again to all of you Revers,
>
> 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.
>
> put the result into tResult
> put the uniDecode of tResult into myDeText
> put myDeText
>
> This results in a - being put in the message box and not a -1 since  
> it is false in this case.
> If I don't unidecode then I get -1 in the message box BUT the  
> switch case does not work????
>
> switch myDeText
> case 0
> put "true" into tResult
> return tResult
> break
> case -1
> put "false" into tResult
> return tResult
> break
> end switch
>
> ALSO, without the uniDecode if I put the 0 and -1 in quotes it  
> still steps right past the case -1.
>
> switch myDeText
> case "0"
> put "true" into tResult
> return tResult
> break
> case "-1"
> put "false" into tResult
> return tResult
> break
> end switch
>
> If I change the result to true then I DO get the 0 and the quoted  
> case works.
> And if I change the -1 to just a - then the damn thing works with  
> uniDecode and quoted "0" and "-".
>
> switch myDeText
> case "0"
> put "true" into tResult
> return tResult
> break
> case "-"
> put "false" into tResult
> return tResult
> break
> end switch
>
> I think I have tried all possible combinations and still can't seem  
> to get it right.
>
> Any thoughts? Help is appreciated.
>
> Tom
>
>
> Thomas J McGrath III
> 3mcgrath at adelphia.net
>
> Lazy River Software™ - http://www.lazyriversoftware.com
>
> Lazy River Metal Art™ - http://www.lazyriversoftware.com/metal.html
>
> Meeting Wear™ - http://www.cafepress.com/meetingwear
>
> Semantic Compaction Systems - http://www.minspeak.com
>
> SCIconics, LLC - http://www.sciconics.com/sciindex.html
>
>
>
>
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

Thomas J McGrath III
3mcgrath at adelphia.net

Lazy River Software™ - http://www.lazyriversoftware.com

Lazy River Metal Art™ - http://www.lazyriversoftware.com/metal.html

Meeting Wear™ - http://www.cafepress.com/meetingwear

Semantic Compaction Systems - http://www.minspeak.com

SCIconics, LLC - http://www.sciconics.com/sciindex.html










More information about the use-livecode mailing list