Max Size Of Array

B

Bob Barrows [MVP]

RN1 said:
Is there any limitation to the maximum size of an array in ASP?

"ASP" does not have arrays: vbscript and jscript do, and the answer may
depend on which scripting language you are using (or maybe not - I'm
feeling too lazy right now to go look it up)

In either case, the answer is Yes, and hopefully you will never try to
reach the limit. Your server will probably die before you get there :)
.. . .

OK, I did look it up: in VBA, the UBound function returns a Long value,
so the max value it can return is 2,147,483,647 - is that big enough for
you? :)
I can't find the corresponding info for jscript right now, but I doubt
it's relevant for you anyways.
 
D

Dave Anderson

Bob said:
I can't find the corresponding info for jscript right now, but I
doubt it's relevant for you anyways.

JScript arrays are associative and sparse, so they don't really have a
limit. There are practical limitations, however. For example, Array.length
is the same for (2^53)-element and (2^53+1)-element arrays
 
R

RN1

"ASP" does not have arrays: vbscript and jscript do, and the answer may
depend on which scripting language you are using (or maybe not - I'm
feeling too lazy right now to go look it up)

In either case, the answer is Yes, and hopefully you will never try to
reach the limit. Your server will probably die before you get there :)
. . .

OK, I did look it up: in VBA, the UBound function returns a Long value,
so the max value it can return is 2,147,483,647 - is that big enough for
you? :)
I can't find the corresponding info for jscript right now, but I doubt
it's relevant for you anyways.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Doesn't the max limitation depend on the server's memory size?
 
D

Dave Anderson

RN1 said:
Doesn't the max limitation depend on the server's memory size?

Probably not as much as the OS limitation. I would be very surprised to hear
that JScript was re-written to use 64-bit memory addressing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top