Subj : Re: enumerated variables - how to coerce them to anything else than an Int ? To : borland.public.cpp.borlandcpp From : R.Wieser Date : Tue Oct 11 2005 12:54 am Ed Mulroy schreef in berichtnieuws 434ac54c$1@newsgroups.borland.com... Hello Ed, > In Win32 an int IS a long. They are both 4 byte signed values. I'm sorry, I forgot to tell you that this is used in a DOS environment, using an old compiler (in which the size of an Int is 2 bytes). [snip] > The way I would try to limit what can be put into it is to define a class > and overload the basic operations, checking for valid enum values and doing > something for invalid ones. Then I would use that instead of the enum. At the moment I'm just filling the structure with constant data. I do not (yet) use any functions for it. My current target is as much trying to keep the source as readable as possible, make sure that my mistakes (in changing the contents of the structure) will be catched by the compiler, as learning how enumeration can be used to it's fullest. Thanks for your response. Regards, Rudy Wieser .