qazwsx Posted July 13, 2007 Share Posted July 13, 2007 Is it possible to create arrays where the array number is a variable? For example, $var[$count] = 1. But that says badly formatted array. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 13, 2007 Moderators Share Posted July 13, 2007 Is it possible to create arrays where the array number is a variable? For example, $var[$count] = 1. But that says badly formatted array.You have to create the array first, and the number must be there... #include <array.au3> Dim $var[3] $count = 2 $var[$count] = 1 _ArrayDisplay($var) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
qazwsx Posted July 13, 2007 Author Share Posted July 13, 2007 Is it possible to do it without creating the array first? I need this to create an infinite number of arrays if needed. So i cound just have $count increase rather than have to define arrays if they are not needed. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 13, 2007 Moderators Share Posted July 13, 2007 Is it possible to do it without creating the array first? I need this to create an infinite number of arrays if needed. So i cound just have $count increase rather than have to define arrays if they are not needed.No not really, even _ArrayCreate() has to create the array first.. might take a look at Eval() ... Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
SadBunny Posted July 14, 2007 Share Posted July 14, 2007 Is it possible to do it without creating the array first? I need this to create an infinite number of arrays if needed. So i cound just have $count increase rather than have to define arrays if they are not needed.Maybe it's an idea to explain a bit more what you need these Infinite Numbers of Arrays for; there might be a better approach to what you are trying to accomplish.As Einstein said: the need for infinities in calculations often imply the use of too many dimensions. Or something along those lines, anyway... Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
randallc Posted July 14, 2007 Share Posted July 14, 2007 Is it possible to do it without creating the array first? I need this to create an infinite number of arrays if needed. So i cound just have $count increase rather than have to define arrays if they are not needed.Hi, Not sure what you mean.. if you mean you can reuse the same array name with a different number of elements each [infinite numbers of.. ] time you use that array name, then each time , just "redim $ar_Array[$i_Count]" to give it the correct size Best, randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW 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