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
Printable View
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
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");
}
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?
is that logically possible?
Yeah, even in a sentence, it can't be AND and OR at the same time.
You can go into the actionscript language reference and see what actionscript has in it.
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
Oh nice, never though of it that way...
Thanks yasunobu13