Re: enum options

new topic     » goto parent     » topic index » view thread      » older message » newer message
irv said...

Oh, and as for what I would do with enums starting with 0?

Use 'em. And save some typing.

GTK, and most other libraries written in C, AFAIK, use base 0 for most everything.

Cutting and pasting hundreds of enums is bound to be more accurate than cutting, pasting, and then going back to change each group to start at 0. Which is what I'm doing right now.

Just an (bad) idea:
How about replacing each "enum" with "enum dummy=-1," when you need zero based enums?
I don't test it in Eu 4.0 and the manual isn't clear, but, probably, the interpreter will generate duplicate symbol errors. However, it seems to me that a redeclaration of a symbol with the same value could be valid.

-Fernando

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu