mIRC Home    About    Download    Register    News    Help

Print Thread
#264137 02/11/18 11:22 AM
Joined: Apr 2010
Posts: 969
F
Hoopy frood
OP Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
This probably falls under the "use brackets" rule put forth in other bug reports where conditionals are involved, but figured I'd submit this so its documented.

In instances where an if statement has multiple conditions, a following /inc command will result in an error if brackets are not used:

Code:
; * /inc: insufficient parameters
if (a == a && b == b) inc %example

Last edited by FroggieDaFrog; 02/11/18 11:22 AM.

I am SReject
My Stuff
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
I would also recommend against that particular form of parenthesis as it is also somewhat ambiguous and difficult to parse. mIRC prefers:

Code:
if (a == a) && (b == b) inc %example  or optionally
if ((a == a) && (b == b)) inc %example


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Dec 2002
Posts: 5,412
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,412
Yes, this is the same issue as discussed in your previous thread.


Link Copied to Clipboard