mIRC Home    About    Download    Register    News    Help

Print Thread
#47953 07/09/03 10:06 PM
Joined: Sep 2003
Posts: 20
E
emull Offline OP
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Sep 2003
Posts: 20
I think '=' should be standarized unlike '=='. mIRC is programmed in C++, and in C++ it is used to assign values when incorporated in if statements and such. This is not the case in mIRC.

#47954 07/09/03 10:44 PM
Joined: Feb 2003
Posts: 10
Z
Pikka bird
Offline
Pikka bird
Z
Joined: Feb 2003
Posts: 10
err.. == is used in c++ if-conditions the same way mirc does.

and = does the same in both "languages" , it declares vars.

*shrugs*


return is the movement of sense.
#47955 07/09/03 10:49 PM
Joined: Sep 2003
Posts: 20
E
emull Offline OP
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Sep 2003
Posts: 20
alias test {
var %x = 1,%y = 2
if ((%x = %y) == %y) echo -a %y
echo -a %x
}


... I can't see that it does. *shrugs*

#47956 07/09/03 10:53 PM
Joined: Sep 2003
Posts: 20
E
emull Offline OP
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Sep 2003
Posts: 20
if (bleh == bleh)
and
if (bleh = bleh)
, are both the same in mIRC, but it is not in C++ if bleh is a variable. Did you understand my question now?

#47957 07/09/03 10:53 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
mIRC does not let you do an assignment from within an if statement. mIRC scripting isn't C++, just because mIRC is written in C++ doesn't mean the scripting language must act like C++.

#47958 07/09/03 10:54 PM
Joined: Feb 2003
Posts: 10
Z
Pikka bird
Offline
Pikka bird
Z
Joined: Feb 2003
Posts: 10
oh i got you wrong,, you want to declare vars within the condition.. ..missunderstanding, thought you wanted the same usage of = and == in mIRC/C++ , not same synthax blush

(allthough... it s not THAT hard to set the var before laugh (kidding))


return is the movement of sense.

Link Copied to Clipboard