GLBasic forum

Feature request => IDE/Syntax => Topic started by: MrTAToad on 2009-Jan-14

Title: Something like enum would be useful
Post by: MrTAToad on 2009-Jan-14
...for where you have a long list of numbers that are stored in global variables...
Title: Re: Something like enum would be useful
Post by: Kitty Hello on 2009-Jan-14
Code (glbasic) Select

TYPE Tenum
  one = 1
  two = 2
ENDTYPE
GLOBAL enum AS Tenum

PRINT enum.one, 0,0
Title: Re: Something like enum would be useful
Post by: MrTAToad on 2009-Jan-14
What I would prefer is something akin to C's, whereby you can set the starting value and let the compiler work out what the next value is, eg :

enum {
a=1
b
c
}

where a is 1, b = 2 and c =3
Title: Re: Something like enum would be useful
Post by: Quentin on 2009-Jan-14
I agree. Not really important, but nice to have.
Title: Re: Something like enum would be useful
Post by: Schranz0r on 2009-Jan-15
 :puke:

enum sucks  :good:
Title: Re: Something like enum would be useful
Post by: MrTAToad on 2009-Jan-16
Ah, but a GLBasic version wouldn't!  =D