jaytea commented on a Page, Away Popup Menu  -  Dec 10, 2011
Does using && and || within one paranthesis actually work? I thought you had to separate them.

it fails only in certain cases, only when used without '{', and only because of bugs in mIRC. for example:

//if (1 == 1 || 2 == 2) noop

ambiguous format. mIRC finds '1 == 1' to be true, sees '||' (OR) and attempts to short circuit part of the if statement by skipping ahead to the next relevant bit of code. it's not doing that very well, because the above is NOT really ambiguous. in fact, i'm going to go out on a limb and say that that error should not even exist because the rules governing the interpretation of if statements in mIRC are thorough enough to disambiguate every possible combination of code.

it requires rather deep knowledge of mIRC's interpreter to be able to predict the exact behaviour in all cases, but as long as you check your code carefully, and use braces, it's really just a matter of preference. i've seen a few good coders who don't use them at all. i find including them around each condition enhances readability, so i do :p

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.