Jump to content

Create huuge array


Recommended Posts

Hi!

I want to create an array Global $u[10000000000] but I get error "Array maximum size exceeded.: "

How can I make an array with the size I want and how much space would I need for that array?

Thanks in advance

Edited by muhmuuh

I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more.

Link to comment
Share on other sites

Hi!

I want to create an array Global $u[10000000000] but I get error "Array maximum size exceeded.: "

How can I make an array with the size I want and how much space would I need for that array?

Thanks in advance

Maybe is a system limit, for example I can create an array with 16000000 subscripts.

When the words fail... music speaks.

Link to comment
Share on other sites

yep i found in the help file that the default max size of an array is 16mil but is it possible to declare bigger arrays and how much space would I need?

I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more.

Link to comment
Share on other sites

In my testing, I found I can go to this size:

Global $u[16777216]

I simply changed each digit starting from the highest to 5 and worked up or down depending on the result. If you make the number 16777217, you will get a error.

That's what I get too.

The answer is simply to have multiple arrays and switch between them when you reach the limit of the previous one.

Just curious, why do you need such a big array?

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

  • Moderators

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: 5100 levels

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

Maximum number of user defined functions: No limit

Maximum number of GUI windows: No limit

Maximum number of GUI controls: 65532

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

Just curious, why do you need such a big array?

i have a huuuge list of 10digit numbers and I want to remove duplicate numbers

they are too many and comparing every number with every one won't work here so i decided to mark in this huuge array if I have already found that number

I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more.

Link to comment
Share on other sites

  • Developers

When creating arrays you are limited to up to 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

Woah, you're really doing it the wrong way there man.

I think you're seriously better off with storing everything in a single array. Then do some quicksorting on it and remove all duplicates.

If you want to do it your way, I guess you can do something like this:

Say that the numbers can go from 0000 to 9999, you can then spread all the values over 10 arrays. Any value below 1000 goes into sec0, any below 2000 goes into sec1, etc.

dim $sec0[1000]
dim $sec1[1000]
dim $sec2[1000]
dim $sec3[1000]
dim $sec4[1000]
dim $sec5[1000]
dim $sec6[1000]
dim $sec7[1000]
dim $sec8[1000]
dim $sec9[1000]
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...