SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Sep 2002
    Location
    Foster City, CA, USA
    Posts
    55
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    enumerated datatype

    Just wondering who knows how to make use of the enumerated datatype. A good short example would be nice. I looked in the Help but it wasn't too helpful for me.

    ------------------

  2. #2
    Senior Member
    Join Date
    Nov 1999
    Location
    Eagle, ID,USA
    Posts
    1,035
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: enumerated datatype

    I then created the following function which calls the GetDriveType dll call and returns the drive type as a meaningful variable instead of just a number

    ------------------
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

  3. #3
    Points for Confirmed Friends
    Guest

    Re: enumerated datatype

    As it was said in SilkTest Help,

    An enumerated data type is a data type that groups together a set of values (constant OR fixed) and orders them sequentially from 1 to n.

    Example:
    In the above example, UserType has 3 fixed values and they appear in the same order sequentially in a combobox of a login page.

    Instead of using a hardcoded text to select from the combo box, you can use enum. The pre-requisite is to have a fixed set of values that you need in a sequence. The advantages are, in case of change in the order of these constant values OR change in the items itself you don't have to change your code except changing the enum.

    In the above example, I can use the enum to verify the order of items in the combobox against enum as well verify the contents themselves.

    You can typecast between string & enum, int & enum to use in different requirements. You can also get all the contents of enum using ValuesOfEnum method.

    More later...

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.40 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 7.69%
vBulletin Optimisation provided by vB Optimise v2.7.1 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 06:28 AM.

Copyright BetaSoft Inc.