mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2003
Posts: 2
L
Bowl of petunias
OP Offline
Bowl of petunias
L
Joined: Nov 2003
Posts: 2
CASE 1:

CODE:
//echo -s $iif($file($mircexe).size == $null, N/A, $ifmatch)

RESULT:
* /echo: insufficient parameters

CASE 2:

CODE:
//echo -s $iif($file($mircexe).size, $ifmatch, N/A)

RESULT:
1867776


my question is... WHY?!?!?!?!?!

Atte. LordOfDee

Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
From the mIRC helpfile:
$ifmatch

Returns the first parameter of matching if-then-else comparison.

If the if statement is false then $ifmatch is set to $null since it hasn't matched anything.

Joined: Nov 2003
Posts: 2
L
Bowl of petunias
OP Offline
Bowl of petunias
L
Joined: Nov 2003
Posts: 2
Ok, if "$ifmatch" returns the first parameter of... bla bla bla..., why i get $null?

1) My first parameter is $file($mircexe).size and it's compared with $null...
2) cause the evaluation is false, the $iif identifier must return the size of mirc.exe...that is $ifmatch... that is 1867776

am I wrong?

Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
$ifmatch isn't filled with $file($mircexe).size because your if statement is false and $ifmatch returns the value only if it is true (hence the word matching in the help file).

Joined: Dec 2002
Posts: 266
Z
Fjord artisan
Offline
Fjord artisan
Z
Joined: Dec 2002
Posts: 266
Try:

//echo -s . $iif($file($mircexe).size == $null, N/A, $ifmatch)

With something in front of it so the /echo will at least echo something. This isn't a bug, just someone's logic gone haywire.


You won't like it when I get angry.
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
-void-

Last edited by KingTomato; 11/11/03 07:44 PM.

-KingTomato
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
I believe you are confused, there isn't an /echo in this thread that doesn't have a switch apart from the one you posted.

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
blush Ur right, i missed the -s on the previous.. A simple skim over "/echo " "Insufficient" and seing the .size property lead me to assumtions. Sry for the post


-KingTomato

Link Copied to Clipboard