jezzzzy Posted April 23, 2007 Share Posted April 23, 2007 What is the maximum size of an AutoIT array variable? I am getting this error - "Array variable has incorrect number of subscripts or subscript dimension range exceeded.: ". I'm thinking my array is too big. Link to comment Share on other sites More sharing options...
Developers Jos Posted April 23, 2007 Developers Share Posted April 23, 2007 What is the maximum size of an AutoIT array variable? I am getting this error - "Array variable has incorrect number of subscripts or subscript dimension range exceeded.: ". I'm thinking my array is too big.Arrays: A maximum of 64 dimensions and/or a total of 16 million elements SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 23, 2007 Share Posted April 23, 2007 What is the maximum size of an AutoIT array variable? I am getting this error - "Array variable has incorrect number of subscripts or subscript dimension range exceeded.: ". I'm thinking my array is too big.Post the code snipet that is generating the error. It is MUCH more likely you have a bad array reference syntax than your array is too big. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
xcal Posted April 23, 2007 Share Posted April 23, 2007 (edited) Is it possible that's only theoretical (the dimensions part)? I have a 100x100 array that seems to work fine. Edited April 23, 2007 by xcal How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 23, 2007 Share Posted April 23, 2007 (edited) Is it possible that's only theoretical (the dimensions part)? I have a 100x100 array that seems to work fine. I suspect what you have is a 2-D array: Dim $avTest[100][100] A 64-D array is left as an exercise for the student... Edit: You can't declare all twenty dimensions with 100 indexes each because you get more than 16 million elements. If all the dimensions are 2 indexes each, you can still only get to 24 dimensions (2 ^ 24 = about 16M). To create an array with 64 dimensions and still have less than 16 million elements total, more than half the dimensions have to be a single index. Hmmm... Edited April 23, 2007 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
SpookMeister Posted April 23, 2007 Share Posted April 23, 2007 LOL, When I try to visualize anything bigger than a 3D array I get a headache. I believe brain cells start smoking at that point. [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
xcal Posted April 23, 2007 Share Posted April 23, 2007 I suspect what you have is a 2-D array: Dim $avTest[100][100] Oops, right you are. How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
jezzzzy Posted April 24, 2007 Author Share Posted April 24, 2007 Thank you for your timely responses - and very educational. PsaltyDS was correct. I was For...Nexting to 100 but my array only contained 3 elements. Now I need to find out why it only has 3 elements. It should have thousands.... I'll post back if I get stuck again. Thanks for the help. Link to comment Share on other sites More sharing options...
i542 Posted April 24, 2007 Share Posted April 24, 2007 Thanks for the help.You welcome.i542 I can do signature me. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now