Back to the Vavoom Forum Archives


Forum

[1.22] VC compiler "enum" issue

Sat, 20 Jan 2007 14:37:48

Crimson Wizard

I am not sure if this is a bug or it was intented to be so. Using a constant defined by "enum" for calculating another constant's value before that first constant is mentioned in vc file does not cause any compiler error, while undefined constant seems to be treated as 0. Example:
class DoomDefs : Object;

enum
{
	MYCONST = 100 + ANOTHER_CONST	// ANOTHER_CONST is treated as 0 here
};
...........
...........
enum
{
	ANOTHER_CONST = 50
};

Back to the Vavoom Forum Archives