Results 1 to 3 of 3

Thread: about arrays........... ???

  1. #1

    Thread Starter
    Frenzied Member wengang's Avatar
    Join Date
    Mar 2000
    Location
    Beijing, China
    Posts
    1,604
    Hi all. one more question.

    Are strArrays limited to 32768? What if I have say 50000 things?

    ANybody know?

    Thanks
    Wengang
    Wen Gang, Programmer
    VB6, QB, HTML, ASP, VBScript, Visual C++, Java

  2. #2
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    just use 2 arrays instead, it will be twice as much code, but it will work
    NXSupport - Your one-stop source for computer help

  3. #3
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Code:
    Option Explicit
    'this is not 50,000 it is 500,000 and no problem
    'however a listbox is limited so you can only
    'exhibit 32,736 items as that is where the list box will klunk out
    
    'however if you just ask for myArr(499,000) the element is in the array
    
    Private Sub Command1_Click()
    
        Dim myarr(500000)
        Dim i
        For i = 1 To 500000
        myarr(i) = i
       ' List1.AddItem myarr(i)
        Next i
        List1.AddItem myarr(489000)
     End Sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width