Results 1 to 3 of 3

Thread: # of array elements?

  1. #1

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418

    Question # of array elements?

    How do i declare an array of x elements in Visual Basic? In Java an array to hold five elements would be declared as int[] i = new int[5]; and indexed as 0 through 4. But if i remember correctly arent arrays declared different in Visual Basic whereas Dim i(4) as Integer would be equivalent to the previous declaration?

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Your example is correct:

    VB Code:
    1. Dim i(4) As Integer 'declares 5 integer elements

  3. #3

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