Page 1 of 1

Negative enums

PostPosted: Mon Apr 14, 2008 2:43 pm
by kda406
On a piece of equipment I use OrbForms to interface with (via IrDA), the device error codes are passed as negative integers. On other C type compilers and systems, I use an enum to set up the error code constants like this:
Code: Select all
enum owerrorcodes {OWNSP=-32760,OWMISSING=-32750...etc...};   // Error constants

But when I try this in OrbForms like this:
Code: Select all
enum { OWNSP=-32760,OWMISSING=-32750...etc...};

I get the error message:
Compile Error: constant integer expected

I have found that if I simply remove the minus signs, the code will compile, but of course then it has the wrong constants.

Am I doing something wrong, or does OrbForms not support negative enums?


Re: Negative enums

PostPosted: Mon May 19, 2008 8:09 pm
by kda406
I guess the lack of replies means this must be a bug. :(

Re: Negative enums

PostPosted: Tue Jul 08, 2008 7:01 am
by dewey
Yes, that is a compiler bug.