mIRC Homepage
Posted By: Ninko Max characters in a variable - 22/04/09 08:51 PM
Hi all,
Quick question, whats the max number of characters a variable can hold in mIRC?

Thanks


Ninko
Posted By: qwerty Re: Max characters in a variable - 22/04/09 09:10 PM
Try it yourself: //var %something = $str(a,5000)

keep decrementing the number until you don't get an error anymore.
Posted By: RusselB Re: Max characters in a variable - 22/04/09 09:18 PM
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.
Posted By: argv0 Re: Max characters in a variable - 22/04/09 09:21 PM
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.
Posted By: Ninko Re: Max characters in a variable - 23/04/09 02:40 AM
Thanks all for the feedback!

Take care


Ninko
© mIRC Discussion Forums