Jump to content

Storing Many Values


Recommended Posts

Is it true that the array only holds 21 elements? If so, I'm looking for a good way to read all the files in a directory and then save all the file names to be recalled later in the program. Should i use a single variable or have the program create a txt document on the fly and read the names from there? What is the best way to go about this?

Link to comment
Share on other sites

That is 21 for the _ArrayCreate UDF. You can make your own easy as the example below shows.

Global $array[30] = [1, 2, 3, 4, ... ]

... is more elements. So you can have many elements in your array.

_ArrayCreate existed before the new array syntax was added.

:whistle:

Edit:

More array info on the Wiki...

http://www.autoitscript.com/wiki/index.php?title=Arrays

Edited by MHz
Link to comment
Share on other sites

so im guessing there is no limit to the size of the array.... i would just have to get how many elements i want to put it and create the array using that value. Im guessing you can also increase the size of the array at your leisure.

I am not sure of the limit if their is one even, but you just create what you need to save memory. ReDim is used to resize arrays.
Link to comment
Share on other sites

From the FAQ in the helpfile:

15. What are the current technical limits of AutoIt v3?

Here are details of the current technical limits of AutoIt. Please note that some of the limits are theoretical and you may run into performance or memory related problems before you reach the actual limit.

Maximum length of a single script line: 4,095

Maximum string length: 2,147,483,647 characters

Number range (floating point): 1.7E308 to 1.7E+308 with 15-digit precision

Number range (integers): 64-bit signed integer

Hexadecimal numbers: 32-bit signed integer (0x80000000 to 0x7FFFFFFF)

Arrays: A maximum of 64 dimensions and/or a total of 16 million elements

Maximum depth of recursive function calls: 384 levels

Simultaneous open files: 64

Simultaneous active HotKeys: 64

Maximum number of variables in use at one time: No limit

Maximum number of user defined functions: No limit

Maximum number of GUI windows: 1024

Maximum number of GUI controls per window: 4096

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Link to comment
Share on other sites

:whistle: I would so reach that limit easy... :)

How so? I have never encountered that limit.

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Link to comment
Share on other sites

Link to comment
Share on other sites

  • Moderators

I was joking.....

But, I could automate the values to be a number and see if it will reach that value....

:whistle: And that would prooooooove... what exactly? We already know the limitation.

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

:whistle: And that would prooooooove... what exactly? We already know the limitation.

Good Question.... :lol: I do belive the helpfile said "some of the limits are theoretical"...

When i said that i could reach the limit easy i was JOKING!! :)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...