Max Size Of Array

Discussion in 'ASP General' started by RN1, Dec 14, 2007.

  1. RN1

    RN1 Guest

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

    Thanks
    RN1, Dec 14, 2007
    #1
    1. Advertising

  2. RN1 wrote:
    > 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.


    --
    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.
    Bob Barrows [MVP], Dec 14, 2007
    #2
    1. Advertising

  3. Bob Barrows [MVP] wrote:
    > 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


    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms.
    Dave Anderson, Dec 14, 2007
    #3
  4. RN1

    RN1 Guest

    On Dec 14, 11:47 pm, "Bob Barrows [MVP]" <>
    wrote:
    > RN1 wrote:
    > > 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.
    >
    > --
    > 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?
    RN1, Dec 14, 2007
    #4
  5. RN1 wrote:
    > On Dec 14, 11:47 pm, "Bob Barrows [MVP]" <>
    > wrote:
    >> RN1 wrote:
    >>> 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.



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


    Yes, I think I was implying that when I talked about his server dying.

    --
    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.
    Bob Barrows [MVP], Dec 14, 2007
    #5
  6. RN1 wrote:
    > 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.



    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms.
    Dave Anderson, Dec 14, 2007
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    831
    bruce barker \(sqlwork.com\)
    Nov 17, 2006
  2. suppamax

    Array max size

    suppamax, Jun 26, 2007, in forum: C++
    Replies:
    1
    Views:
    493
    Victor Bazarov
    Jun 26, 2007
  3. Summercool
    Replies:
    9
    Views:
    871
    dorayme
    Oct 23, 2007
  4. Greg Ferris

    Textarea max rows and max characters per row

    Greg Ferris, Jan 16, 2004, in forum: Javascript
    Replies:
    2
    Views:
    566
    Greg Ferris
    Jan 16, 2004
  5. kriton
    Replies:
    0
    Views:
    328
    kriton
    Apr 22, 2005
Loading...

Share This Page