HELP user defined data types 
Author Message
 HELP user defined data types

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



Fri, 17 Nov 2000 03:00:00 GMT  
 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.



Sun, 19 Nov 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Q: variant data type with user defined data type

2. VB4: Help: data-alignment in user defined data types

3. Help: data-alignment in user defined data types

4. Compile error: User-defined data type not defined!

5. Type mismatch on user defined data type

6. Help with User-Defined Data Types

7. user defined type not defined error help please

8. Help: user defined type not defined (Outlook.Application)

9. User Control - User-defined type not defined

10. Help!!-NEWBIE - Application Wizard -(WROX BOOK) Error- User defined type not defined

11. Help!!-NEWBIE - Application Wizard -(WROX BOOK) Error- User defined type not defined

12. Passing Array or a user defined data type as a parameter to a storedprocedure in Oracle

 

 
Powered by phpBB® Forum Software