Results 1 to 8 of 8

Thread: Enumeration

  1. #1

    Thread Starter
    Fanatic Member SeaHag's Avatar
    Join Date
    Jul 2001
    Location
    Lake Huron
    Posts
    901

    Enumeration

    Enum Test
    9x25
    9x34
    end enum


    this wont work with numbers..
    Why not.. and is there a work around?


    Seahag

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    Enums are a form of named constants and as such they follow the same role as for other named constants or variable names.
    That is the name must start with a letter or an underscore sign not a number.

  3. #3

    Thread Starter
    Fanatic Member SeaHag's Avatar
    Join Date
    Jul 2001
    Location
    Lake Huron
    Posts
    901

    Ok

    The underscore doesn't work either.
    Any suggestions how I can trick it!

  4. #4
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    What Joacim is refering to is that you have to create named constants:
    VB Code:
    1. Enum MyColors
    2.     RED = 1
    3.     GREE = 2
    4.     BLUE = 3
    5. End Enum

  5. #5

    Thread Starter
    Fanatic Member SeaHag's Avatar
    Join Date
    Jul 2001
    Location
    Lake Huron
    Posts
    901

    Yes

    My problem is I work with alot of engineering math,
    If I were to name it something else , it would confuse people( me included)

    I refer to a 9x25, 8x24 10x36 .... of the Elevator type..
    Thats thier name... ? I wouldn`t know how to describe them otherwise

    I am suggesting there is no work around?

  6. #6
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Just stick a letter in front of it, whats the big deal?
    Enum Test
    e9x25
    e9x34
    end enum

    It still makes sense and you can tell what it is and it'll work.

  7. #7

    Thread Starter
    Fanatic Member SeaHag's Avatar
    Join Date
    Jul 2001
    Location
    Lake Huron
    Posts
    901
    Fine then.. sheeesh


    Thanx everone!

  8. #8
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Sorry!

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