Not possible, as soon as the first if() statement fires, the other two won't get a chance to be parsed. So this is exactly (more of less) what the thread starter said it was, bad copy & pasting job by someone who doesn't know what they're doing.
Disiance
@Disiance
Best posts made by Disiance
Latest posts made by Disiance
-
RE: Clever if/else statement
-
RE: Clever if/else statement
[quote user="R.Flowers"][quote user="Disiance"]
At first glance I noticed it was a true/false test, so I assumed the WTF would be the else { } block, test for true, then false, and then maybe, I dunno, FileNotFound?
[/quote]
Well I don't know... since it's
if (condition){
...
} else if(condition) { ....Which means it's checking for
condtion
to be true twice in a row - right?Maybe it's Flash with threads, and they're checking if
condtion
changes in those few processor ticks... :)[/quote]Yep, that's what it's doing, but from my first glance I expected it to check true and then false and then else, which would be a WTF, but it's just checking true twice, with a different result in each, which is even a bigger WTF.
-
RE: Clever if/else statement
Good God Almighty...
At first glance I noticed it was a true/false test, so I assumed the WTF would be the else { } block, test for true, then false, and then maybe, I dunno, FileNotFound?
But my god, can you at least decide what to do on true?
Good WTF there.