MessageHeader action

Jan-Jaap van der Geer jjvdgeer at inbox.com
Sat Oct 10 17:46:57 BST 2009


Ralph Corderoy <ralph at inputplus.co.uk> wrote:

> >    Message_Prequit       = .Bits: 8,
> >    Message_PreQuit       = .Bits: 8,  // V6.21 TV

> > Any reason why action is defined just as a "bits" and not its
> > own specialised (enum) type like most other things?

> Is it because enums in this language can't have two things with
> the same value?  (I know you can in C.)

I think the above is just a correction of an old error where the
old value is kept for compatibility. As I think this stuff has
been there from the beginning, I'd be very surpised if they'd
sacrificed type-safety for the sake of compatibility with the older
version. It would have been easier to leave it.

However, thinking about it, if there would be a definition in
another .swi file (not that unnatural for a message type) it would
be difficult to generate an enum-type from it since the definition
would be split in several .h (or whatever) files.

Maybe it is actually better as it is.

Cheers,
Jan-Jaap





More information about the oslib-user mailing list