Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Draco5869

array that holds two values

This topic is 5539 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
Advertisement
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]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!