mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2003
Posts: 14
Q
qFox Offline OP
Pikka bird
OP Offline
Pikka bird
Q
Joined: Oct 2003
Posts: 14
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.

Joined: Mar 2003
Posts: 16
T
t0m Offline
Pikka bird
Offline
Pikka bird
T
Joined: Mar 2003
Posts: 16
%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!


Darwin_Koala

Junior Brat, In-no-cent(r)(tm) and original source of DK-itis!
Joined: Nov 2003
Posts: 157
Vogon poet
Offline
Vogon poet
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.
Joined: Oct 2003
Posts: 14
Q
qFox Offline OP
Pikka bird
OP Offline
Pikka bird
Q
Joined: Oct 2003
Posts: 14
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.

Joined: Oct 2003
Posts: 14
Q
qFox Offline OP
Pikka bird
OP Offline
Pikka bird
Q
Joined: Oct 2003
Posts: 14
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: 329
Fjord artisan
Offline
Fjord artisan
Joined: Dec 2002
Posts: 329
Solved in mIRC 6.15
33.Fixed while/if bug when using $iif() in comparisons.


Link Copied to Clipboard