mIRC Homepage
Posted By: qFox Bug: $iif in while combined with && || - 03/04/04 05:13 PM
t { %i = 0 | while ($iif(%i == 5 && %i == 6,%i,%i) < 7) { inc %i } }

the parser thinks that the && that belongs to the $iif, actually belongs to the while
adding brackets wont fix this.
Posted By: t0m Re: Bug: $iif in while combined with && || - 03/04/04 07:07 PM
%i == 5 && %i == 6 is always false
whats the point in having iif return the same value no matter whats the condition evaluated to (0/1)?
$iif(%i == 5 && %i == 6,%i,%i)

The use of the && within the $iif command means that the && does belong to the iif, not the while command.

So, strange as that line of code may seem, it is doing exactly as it is told! To try and rebracket it will only conufse the iif command!
Posted By: RuFy Re: Bug: $iif in while combined with && || - 04/04/04 05:24 PM
$iif(%i == 5 && %i == 6,%i,%i)

is a nonsense

When %i == 5 than %i != 6
and
When %i == 6 than %i != 5

Try with
$iif(%i == 5 || %i == 6,%i,%i)

wont work?

Try to contact Khaled?

call the 800********
smile
Posted By: qFox Re: Bug: $iif in while combined with && || - 04/04/04 10:48 PM
dude... it was a quick example.
it shouldnt matter either the one trumps the other jeez
but fine

$iif(%i > 5 && %i < 6,5,6)

same deal, jeez :\

and the point of the bug was, that mirc thinks the && belongs to the while, not the iif.that was in fact the bug i was reporting. but thank you for trying.
Posted By: qFox Re: Bug: $iif in while combined with && || - 04/04/04 10:59 PM
ok perhaps i should re-explain

t { %i = 0 | while ($iif(%i == 5 && %i == 6,%i,%i) < 7) { inc %i } }

in this example, the && belongs to $iif()
HOWEVER, mirc thinks the && belongs to the while, and returns an error stating the $iif is incorrect

AND IT DOESNT $%@%# MATTER THAT THIS EXAMPLE IS USELESS. put any $iif in there, that uses && or || in there you want, it wont work.
Posted By: Krejt Re: Bug: $iif in while combined with && || - 04/06/04 08:16 AM
Solved in mIRC 6.15
33.Fixed while/if bug when using $iif() in comparisons.
© mIRC Discussion Forums