array that holds two values
Is there a way in VB that i can get an array or some datatype that holds two values, like a name and a value for instance? I can''t just use two diff arrays because each value has to go with each name and i sort the names, thanks guys!
-----------------------------------------------------------
Like a sponge!
An array can hold different types of variables ($,% etc..) So just make an array with your data you want in it.
[edited by - anthonyrh1 on August 16, 2003 9:42:47 PM]
[edited by - anthonyrh1 on August 16, 2003 9:42:47 PM]
you can make your own type, thusly:
type MyDataType
name as string
data as integer
end type
and then you have your array:
MyArray as MyDataType(1 to whatever)
and access thusly:
myDataType(index).name
myDataType(index).data
type MyDataType
name as string
data as integer
end type
and then you have your array:
MyArray as MyDataType(1 to whatever)
and access thusly:
myDataType(index).name
myDataType(index).data
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement