
HELP user defined data types
Quote:
> I am taking a home correspondence course in computer programming and I
> do not understand my text book on user defined data structures or data
> types. Could somebody please help me with some information and/or
> examples in Visual Basic. Thank you
User Defined data types are easy to compare to other VB objects.
Think of a text box, it has many properties like;
text1.text
text1.width
etc. which you can use like normal variables. (e.g. text1.text = a$)
You can create user defined data types which also have "properties",
so you might have a variable "player1" with;
player1.name
player1.age
player1.score
etc. which can also be accessed just as other variables such as a$
(player1.name = a$), instead of having many different variables for
the one player.
They are easy to create;
type player1
name as string
age as integer
score as integer
end type
This will give you the example above.
Hope this is helpful (not just to VB programmers, that's why I
replied in c.l.b.m) and not patronising/annoying.
Simon.