Re: lingo-l Comparing Multiple Lists with One List
Thanks Guys for the INFO. Mucho appreciated. I think i was not paying attention in my assembly language class??:) Ravi _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]) Lingo-L is for learning and helping with programming Lingo. Thanks!]
RE: lingo-l Comparing Multiple Lists with One List
Well basically because OR is a boolean operation and doesn't understand multiple iterative parameterization (fancy word for what you are trying to give it), if I understand what you are trying to get at. Try this instead: --IN Movie Script on startMovie global gListStorage, gListStorage1 gListStorage = [scn 1a, scn 2a] gListStorage1 = [scn 1b, scn 2b] end Where gFrameClips = [scn 1a, scn 2a] on mouseUP if ((gListStorage = gFrameClips) OR (gListStorage1 = gFrameClips)) then go scn 3a else if ((gListStorage1 = gFrameClips1) OR (gListStorage = gFrameClips1)) then go scn 3b end if end Hope that helps, Ike Eisenhauer -Original Message- Hi All, I am comparing Multiple lists with one list with the OR statement. For somereason it does not work. When there is no OR statement it works. What am i doing wrong. ravi --IN Movie Script on startMovie global gListStorage, gListStorage1 gListStorage = [scn 1a, scn 2a] gListStorage1 = [scn 1b, scn 2b] end Where gFrameClips = [scn 1a, scn 2a] on mouseUP if (gListStorage OR gListStorage1) = gFrameClips then go scn 3a else if (gListStorage1 OR gListStorage) = gFrameClips1 then go scn 3b end if end [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]) Lingo-L is for learning and helping with programming Lingo. Thanks!]
Re: lingo-l Comparing Multiple Lists with One List
gFrameClips = [scn 1a, scn 2a] on mouseUP if (gListStorage OR gListStorage1) = gFrameClips then go scn 3a else if (gListStorage1 OR gListStorage) = gFrameClips1 then go scn 3b end if end As far as I know it has to be like this if (gListStorage = gFrameClips) OR (gListStorage1 = gFrameClips) then HTH - Bill _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]) Lingo-L is for learning and helping with programming Lingo. Thanks!]
Re: lingo-l Comparing Multiple Lists with One List
I am comparing Multiple lists with one list with the OR statement. if (gListStorage OR gListStorage1) = gFrameClips then Here's your problem. You're doing a boolean OR of gListStorage and gListStorage1, then comparing that with gFrameClips. It should work if you do it like this: if (gListStorage = gFrameClips) OR (gListStorage1 = gFrameClips) Booleans can be tricky. It might be easier to understand if we start with binary numbers and bitwise boolean operators: 0010 OR 0001 = 0011 In most languages, boolean operators are first in the order of precedence. Plus, you've added parentheses to further enforce that order. With our binary example, consider the following two statements: if (0010 OR 0001) = 0001 will evaluate to false because the expression within the parentheses is evaluated first. So, what actually happens is: 1. (0010 OR 0001) evaluates to 0011 2. 0011 = 0001 evaluates to false. On the other hand, rearranging the parentheses: if (0010 = 0001) OR (0001 = 0001) if (0010 = 0001) evaluates to FALSE, but (0001 = 0001) evaluates to TRUE so your OR comparison works. HTH. Maybe I've done too much assembly language programming. Cordially, Kerry Thompson [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]) Lingo-L is for learning and helping with programming Lingo. Thanks!]
Re: lingo-l Comparing Multiple Lists with One List
on mouseUP if (gListStorage OR gListStorage1) = gFrameClips then go scn 3a else if (gListStorage1 OR gListStorage) = gFrameClips1 then go scn 3b end if end You need to test both: if ((gListStorage = gFrameClips) or ( gListStorage1 = gFrameClips)) then -- [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]) Lingo-L is for learning and helping with programming Lingo. Thanks!]