Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 How do you do flexible arrays in VB?
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
GlobeTrotter




PostPosted: Thu Mar 10, 2005 11:12 pm   Post subject: How do you do flexible arrays in VB?

Any help would be appreciated.
Sponsor
Sponsor
Sponsor
sponsor
Brightguy




PostPosted: Thu Mar 10, 2005 11:38 pm   Post subject: Re: How do you do flexible arrays in VB?

For a dynamic array, don't include any array bounds in the declaration. You can change the bounds using the ReDim statement.
code:
Dim FlexArray() As Integer
Redim FlexArray(1 to 10) As Integer

If don't want the values in the array to reset when you resize it, add "Preserve" after ReDim.
GlobeTrotter




PostPosted: Fri Mar 11, 2005 12:48 pm   Post subject: (No subject)

Thanks.
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: