|
-
Oct 12th, 2000, 12:07 PM
#1
Dynamic Array
I need a simple dynamic array for strings in a sub.
I want to add a string value to the array and later on the sub read the array. I know how to read from the array but how do you add.
-
Oct 12th, 2000, 12:18 PM
#2
Frenzied Member
-------->
Code:
Dim myarray() as string
redim preserve myarray(new_size) as string
myarray(new_size-1)= "string"
preserve will keep your previous value,if not use
your previous value will be gone!!!
-
Oct 12th, 2000, 02:02 PM
#3
transcendental analytic
that would make the array contain a nullstring at myarray(new_size)
Well you could redimension without having a counter
Code:
Redim preserve myarray(ubound(myarray)+1)
myarray(ubound(myarray))="String"
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Oct 13th, 2000, 11:23 AM
#4
Thanks!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|