gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gm2] extension request


From: Martin Kalbfuss
Subject: [Gm2] extension request
Date: Mon, 27 Sep 2010 00:55:12 +0200

Hi.

While working on my SDL wrapper, I had a problem with enumerations and
sets.

The save enumeration type of modula is not as flexible as the C/C++
enumeration type. You cannot explicitly set numerical values for the
flags. That's no problem as long as you work with modula only. But if
you have a C/C++ enumeration like

typedef enum
{
        VALUE_1 = 0,
        VALUE_2 = 60;

}AN_ENUM;

You get in trouble. You have to use plain numbers in your definition
modules and loose the savety of the Modula types and have a C-Like
interface. Not nice. Would it be possible to allow to set the values for
modula enumerations explicitly?

Like

TYPE Key = (..., K_AT = 64, K_LEFTBRACKET = 91, ...);

Thanks,

Martin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]