mIRC Home    About    Download    Register    News    Help

Print Thread
Max characters in a variable #211577 22/04/09 08:51 PM
Joined: Jun 2004
Posts: 139
N
Ninko Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Jun 2004
Posts: 139
Hi all,
Quick question, whats the max number of characters a variable can hold in mIRC?

Thanks


Ninko

Re: Max characters in a variable [Re: Ninko] #211578 22/04/09 09:10 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Try it yourself: //var %something = $str(a,5000)

keep decrementing the number until you don't get an error anymore.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: Max characters in a variable [Re: Ninko] #211579 22/04/09 09:18 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
This number varies as it also includes the number of characters in the variable name.
If I recall correctly, before version 6.32 it was about 600 characters, and after about 4000.

Re: Max characters in a variable [Re: RusselB] #211580 22/04/09 09:21 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Variables were pretty safe at around the 900 mark pre-6.32 (the hard limit was around ~950, 50 chars for the var name should have sufficed). The pre-6.32 limit was not as consistent, though, as not all commands had the same hard limit-- I think that was mostly fixed with the new length limit.

The current hard limit is roughly 4k, or 4096 bytes, meaning you will be safe with 4000.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: Max characters in a variable [Re: argv0] #211582 23/04/09 02:40 AM
Joined: Jun 2004
Posts: 139
N
Ninko Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Jun 2004
Posts: 139
Thanks all for the feedback!

Take care


Ninko