A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: [help] AND/OR operator

  1. #1
    Senior Member Gloo pot's Avatar
    Join Date
    Aug 2005
    Location
    Australia Mate!
    Posts
    874

    [help] AND/OR operator

    I searched all threw the help files on flash mx 2004 pro but i cant find what the AND/OR operator is...

    Dose it exsist and what is it?

    Thanks people
    92.7 Fresh FM for all your South Aussies - Doof Doof music FTW people!

  2. #2
    Monkey Moderator Lexicon's Avatar
    Join Date
    Jul 2001
    Location
    UK
    Posts
    2,038
    AND = &&
    OR = ||

    Code:
    var a = 1;
    var b = 2;
    var c = 3;
    
    if(a<b && b<c)
    {
        trace("a is less than b AND b is less than c");
    }
    
    if(a>b || a==1)
    {
        trace("a is greater than b OR a is equal to 1");
    }
    www.lexicon-design.co.uk
    If we aren't supposed to eat animals, then why are they made of meat?
    If Vegetarians like animals so much, why do they eat all their food?

  3. #3
    Senior Member Gloo pot's Avatar
    Join Date
    Aug 2005
    Location
    Australia Mate!
    Posts
    874
    Thanks but thats not what I was after... I wanted to know what was AND/OR

    AND == &&
    OR == ||
    AND/OR == &&||?

    Is there a operator that stands for both AND and OR?
    92.7 Fresh FM for all your South Aussies - Doof Doof music FTW people!

  4. #4
    Monkey Moderator Lexicon's Avatar
    Join Date
    Jul 2001
    Location
    UK
    Posts
    2,038
    is that logically possible?
    www.lexicon-design.co.uk
    If we aren't supposed to eat animals, then why are they made of meat?
    If Vegetarians like animals so much, why do they eat all their food?

  5. #5
    The Flashman earl223's Avatar
    Join Date
    Sep 2000
    Location
    Marikina City, Philippines
    Posts
    876
    Yeah, even in a sentence, it can't be AND and OR at the same time.
    i eat actionscripts for breakfast

  6. #6
    Senior Member
    Join Date
    Feb 2005
    Posts
    1,836
    You can go into the actionscript language reference and see what actionscript has in it.
    .

  7. #7
    Since || is an inclusive OR, it can be thought of as And/Or.

    A || B is true when A is true, B is true or both are true

  8. #8
    Senior Member Gloo pot's Avatar
    Join Date
    Aug 2005
    Location
    Australia Mate!
    Posts
    874
    Oh nice, never though of it that way...
    Thanks yasunobu13
    92.7 Fresh FM for all your South Aussies - Doof Doof music FTW people!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center