Re: Enum?
- Posted by gshingles <gshingles at gmail.c?m> May 16, 2008
- 764 views
Derek Parnell wrote: > The tokens I propose are these below ... (but please feel free to come up with > better ones) > (1) enum:length > (2) enum:min > (3) enum:max > > When used in an enumeration declaration, they do not themselves become values > in the enumeration. > > Example: > > }}} <eucode> > enum > FILE_NO, > LINE_NO, > FILE_PTR, > FILE_START_SYM, > OP_WARNING=-1, > OP_TRACE=-2, > OP_TYPE_CHECK=0, > OP_PROFILE_TIME=18, > OP_PROFILE_STATEMENT=3, > OP_DEFINES=9, > minFILE=enum:min, -- lowest enumeration value > maxFILE=enum:max, -- highest enumeration value > lenFILE=enum:length -- count of items in THIS enumeration > </eucode> {{{ Yep. Looks good, if a bit wordy. Isn't ':' for namespaces, or did that become '.' last week? If it is ':' you might have to do a bit of gymnastics in case you have a namespace 'enum' ? I'm for whatever works though and provides the most features with the least barriers to speedy implementation. Gary