mIRC Home    About    Download    Register    News    Help

Print Thread
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

Joined: Jan 2003
Posts: 2,523
Q
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
Joined: Aug 2004
Posts: 7,252
R
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.

Joined: Oct 2003
Posts: 3,918
A
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"
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


Link Copied to Clipboard