mIRC Home    About    Download    Register    News    Help

Print Thread
Q
qFox
qFox
Q
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.

T
t0m
t0m
T
%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)?

Joined: Feb 2004
Posts: 206
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Feb 2004
Posts: 206
$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!

Joined: Nov 2003
Posts: 157
R
Vogon poet
Offline
Vogon poet
R
Joined: Nov 2003
Posts: 157
$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

Last edited by RuFy; 04/04/04 05:26 PM.
Q
qFox
qFox
Q
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.

Q
qFox
qFox
Q
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.

Joined: Dec 2002
Posts: 222
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Dec 2002
Posts: 222
Solved in mIRC 6.15
33.Fixed while/if bug when using $iif() in comparisons.


Link Copied to Clipboard