mIRC Home    About    Download    Register    News    Help

Print Thread
#215891 13/10/09 08:15 PM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
variable += blah

is that simply:

variable = variable + blah

pouncer #215892 13/10/09 08:32 PM
Joined: Jul 2006
Posts: 4,156
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,156
Yes, but how this is related to mIRC ?


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #215893 13/10/09 08:39 PM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
Sorry, I'm just trying to convert some other languages implementation into mirc. Thanks for the verification

Last edited by pouncer; 13/10/09 08:39 PM.
pouncer #215894 13/10/09 09:40 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
what's wrong with
Code:
/inc %variable blah

RusselB #215895 13/10/09 09:50 PM
Joined: Jul 2006
Posts: 4,156
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,156
Nothing, the point is that he wasn't aware or sure about what += means


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
RusselB #215903 14/10/09 10:56 PM
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
I dont understand. Is this supposed to do something besides set %variable to 1?

DJ_Sol #215907 15/10/09 02:33 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Using
Code:
/inc %variable blah
literally as written there will end up making a variable called %variable and will give it a value of 1

However, my example was based upon the general information given in the original post.

Thus %variable is any variable name and blah is any value

For further information, I suggest you check the mIRC help file using /help /inc

RusselB #215910 15/10/09 11:51 AM
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Yeah I know the inc command. I was wondering what it had to do with the += operator. I thought you were trying to say inc would attach whatever string you have to the variable.

DJ_Sol #215911 15/10/09 06:16 PM
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
+= is not string concatenation if the context is numbers



- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Link Copied to Clipboard