|
-
Aug 21st, 2000, 10:38 AM
#1
Thread Starter
Addicted Member
Could anyone explain in a couple of sentences the purpose of using Enum and Type (or would it take a lot longer) and what UDT is !!!
Thanks for any help
steve
-
Aug 21st, 2000, 11:28 AM
#2
Addicted Member
UDT (User-defined Data type) is the result of a Type statement. You create a UDT by putting together fields of the standard object types in one group and treating it like one object. For example, you have a program about bugs (insects, spiders, etc.) and their individual characteristics. You could have 15 different fields describing them, or you could put those 15 fields into a UDT and have one object. Instead of moving around each of the 15 fields, you just move one UDT object. An Enum is a UDT kind of object that contains a bunch of related constants instead of data fields. I see no use for Enum, but I use UDTs all of the time.
-
Aug 21st, 2000, 11:33 AM
#3
Addicted Member
Hi,
Enums have their use!! Using Enum as constants, you can use those in function parameters so that when the function is called, you get a drop-down list of available options for the values of that parameter. (like in the msgbox function where you have vbAbort,vbOk etc...).
I like them anyway as it saves having to remember values!!
Shaun
Web/Application Developer
VB6 Ent (SP5), Win 2000,SQL Server 2000
-
Aug 21st, 2000, 11:44 AM
#4
Addicted Member
I stand corrected. You learn something new every day, especially here!
-
Aug 21st, 2000, 11:56 AM
#5
Thread Starter
Addicted Member
Cheers
Thanks for the help
Steve
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
|