//if (x isin x, say yes!)
type this from the command line and this will say: yes! (even though it's in the wrong format for an /if statement)
but yesterday, i typed this (or something very similar to this and it gave: * /if: ambiguous format.
//if ((x isin x,) { echo -a yes! )
-> yes!
(no complaint about a missing '}', no terminal ')' printed ....)
It is a valid (if highly unreadable) format, it's not being parsed as two parameters like you think though:
//if (x isin x, say yes!)
The default condition mIRC will look for is operator operand operator, from your example that works out as x isin x,
The commands are taken to be whatever comes next, that is say yes!.
The parentheses are superfluous, just working as grouping, but it'll work just the same without them.
Seeing as it's an incredibly bad format to use, it's no surprise that something similar to this would be treated as ambiguous format, why not use a more readable and structured format instead?
i use: if statement { stuff }
but i typed //if instead of //say $iif by accident, one day it said the ambiguous format, the next it didn't.
I think the unexpected thing is that it *is* being parsed as two parameters, not as one (the one surrounded by parentheses). I would expect it to give an error such as "if: invalid format" - i.e. it's missing a command. Parentheses do not define a grouping anywhere but in a conditional....
I mean - I see that as
//if ([color:red]x[/color] [color:blue]isin[/color] [color:red]x, say yes![/color])
operand operator operand...but maybe I'm just expecting it to be like certain other languages ;P