Re: if/then with and/or
>>if var1 is "goody" and var2 is "nope" and var3 is "hello" then >>doSomething >>end if >> >>That fails. > >It works here, without any parentheses. (v 2.4.1 on Mac OS X) > >Cheers >Dave Cragg I never thought to try parenthesis. As for it working as is on OS X, that's odd to me. It works in HC on my computer, but not in MC, so I figured it was an MC thing. But if it works on OS X in MC... ? T'any rate, as long as I can get it to work someway, I'm happy! I forgot how forgiving HC was about many things. Shari -- --Shareware Games for the Mac-- http://www.gypsyware.com ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: if/then with and/or
At 4:27 pm -0500 15/3/02, Shari wrote: >Okay, now this one's bugging me... > >If my if/then handler includes and/or, it fails. > >if var1 is "goody" and var2 is "nope" and var3 is "hello" then >doSomething >end if > >That fails. It works here, without any parentheses. (v 2.4.1 on Mac OS X) Cheers Dave Cragg ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: if/then with and/or
<< if var1 is "goody" and var2 is "nope" and var3 is "hello" then doSomething end if >> I think you'll find parentheses solve your problem- although "and"s maybe should work anyway, "or"s are downright ambiguous without them. So... try this (or some variation): This is the heavy version, but it's the most clear, IMHO. if ( ((var1 is "goody") and (var2 is "nope")) and (var3 is "hello") ) then doSomething end if You could certainly get away with simpler versions such as: if (var1 is "goody" and var2 is "nope") and (var3 is "hello") then doSomething end if HTH, Brian ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: if/then with and/or
Shari, Try: if ((var1 is "goody") and (var2 is "nope") and (var3 is "hello")) then doSomething end if See if that works. Ken Ray Sons of Thunder Software Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ - Original Message - From: "Shari" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 15, 2002 3:27 PM Subject: if/then with and/or > Okay, now this one's bugging me... > > If my if/then handler includes and/or, it fails. > > if var1 is "goody" and var2 is "nope" and var3 is "hello" then > doSomething > end if > > That fails. > > if var1 is "goody" then > if var2 is "nope" then >if var3 is "hello" then > doSomething >end if > end if > end if > > That works. > > ? > > -- > --Shareware Games for the Mac-- > http://www.gypsyware.com > ___ > metacard mailing list > [EMAIL PROTECTED] > http://lists.runrev.com/mailman/listinfo/metacard > ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: if/then with and/or
--- Shari <[EMAIL PROTECTED]> wrote: > ? parentheses? = [EMAIL PROTECTED] http://www.erikhansen.org __ Do You Yahoo!? Yahoo! Sports - live college hoops coverage http://sports.yahoo.com/ ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
if/then with and/or
Okay, now this one's bugging me... If my if/then handler includes and/or, it fails. if var1 is "goody" and var2 is "nope" and var3 is "hello" then doSomething end if That fails. if var1 is "goody" then if var2 is "nope" then if var3 is "hello" then doSomething end if end if end if That works. ? -- --Shareware Games for the Mac-- http://www.gypsyware.com ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard