Results 1 to 5 of 5

Thread: Enum, Type and UDT

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    178

    Question

    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

  2. #2
    Addicted Member
    Join Date
    Jan 2000
    Location
    Fresno, California, USA
    Posts
    195
    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.

  3. #3
    Addicted Member S@NSIS's Avatar
    Join Date
    Aug 2000
    Location
    Stoke-On-Trent, England
    Posts
    243
    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

  4. #4
    Addicted Member
    Join Date
    Jan 2000
    Location
    Fresno, California, USA
    Posts
    195
    I stand corrected. You learn something new every day, especially here!

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    178

    Thumbs up 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
  •  



Click Here to Expand Forum to Full Width