[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[DotGNU]Another ECMA & QT# question.
From: |
Gopal V |
Subject: |
[DotGNU]Another ECMA & QT# question. |
Date: |
Sat, 19 Oct 2002 20:44:29 +0530 |
User-agent: |
Mutt/1.2.5i |
Is the following code valid ?
public enum FormatOption {
DoubleBuffer = 1,
DepthBuffer = 2,
Rgba = 4,
AlphaChannel = 8,
AccumBuffer = 16,
StencilBuffer = 32,
StereoBuffers = 64,
DirectRendering = 128,
HasOverlay = 256,
SingleBuffer = DoubleBuffer << 16,
NoDepthBuffer = DepthBuffer << 16,
ColorIndex = Rgba << 16,
NoAlphaChannel = AlphaChannel << 16,
NoAccumBuffer = AccumBuffer << 16,
NoStencilBuffer = StencilBuffer << 16,
NoStereoBuffers = StereoBuffers << 16,
IndirectRendering = DirectRendering << 16,
NoOverlay = HasOverlay << 16
}
ECMA Spec 21.4:
1. Paragraph 31 The following operators can be used on values of enum
types: ==, !=, <, >, <=, >= (§14.9.5), + (§14.7.4), (§14.7.5), -,^,
&, | (§14.10.2), ~ (§14.6.4), ++, (§14.5.9 --and §14.6.5), and sizeof
(§25.5.4).
If this works elsewhere (viz, where QT.dll was compiled), should we
support this ?
I had implemented this when I noticed that ECMA spec does not specify
<< or >> .... But note that it does not specify that '>>' or '<<' cannot
be used either ;-) ...
See attached patch for fix (hopefully the right one).
Gopal
--
The difference between insanity and genius is measured by success
patch
Description: Text document
- [DotGNU]Another ECMA & QT# question.,
Gopal V <=