www.digitalmars.com         C & C++   DMDScript  

D - Endian ENUM

reply "Matthew Wilson" <matthew stlsoft.org> writes:
I need/want to define an enum to represent endianness (in order that people
can request an endianness to their int in the registry API).

I've currently defined it in the synsoft.types module as

    public enum Endian
    {
            Unknown      =   0
        ,   Little             =   1
        ,   Big                =   2
        ,   Middle          =   3
        ,   ByteSex        =   4
      version(LittleEndian)
      {
        ,   Ambient        =   Little
      }
      version(BigEndian)
      {
        ,   Ambient        =   Big
      }
    }

Anyone have any violent objections? Have I missed something obvious? (I know
I'm being a little optimistic in imagining D being ported to middle-endian
machines, and I don't know whether we'd ever want to go byte-sexual, but
what the hell!)

If this is something agreeable, it'd be cool if this could go into Phobos
asap, as I don't want any synsoft dependencies in the registry library when
it goes into Phobos, and I'm sure you don't either. ;)

Comments, please
Sep 19 2003
parent reply "Matthew Wilson" <matthew stlsoft.org> writes:
Aaargh!

That won't even compile, since it seems that we can't have a version clause
inside an enum.

Oh unhappy days. :(




"Matthew Wilson" <matthew stlsoft.org> wrote in message
news:bkgjrj$2m5f$1 digitaldaemon.com...
 I need/want to define an enum to represent endianness (in order that
people
 can request an endianness to their int in the registry API).

 I've currently defined it in the synsoft.types module as

     public enum Endian
     {
             Unknown      =   0
         ,   Little             =   1
         ,   Big                =   2
         ,   Middle          =   3
         ,   ByteSex        =   4
       version(LittleEndian)
       {
         ,   Ambient        =   Little
       }
       version(BigEndian)
       {
         ,   Ambient        =   Big
       }
     }

 Anyone have any violent objections? Have I missed something obvious? (I
know
 I'm being a little optimistic in imagining D being ported to middle-endian
 machines, and I don't know whether we'd ever want to go byte-sexual, but
 what the hell!)

 If this is something agreeable, it'd be cool if this could go into Phobos
 asap, as I don't want any synsoft dependencies in the registry library
when
 it goes into Phobos, and I'm sure you don't either. ;)

 Comments, please
Sep 19 2003
parent reply "Walter" <walter digitalmars.com> writes:
Write it like this:

enum Endian { .... }

version (LittleEndian)
{
    const Endian Ambient = Endian.Little;
}
version (BigEndian)
{
    const Endian Ambient = Endian.Big;
}

"Matthew Wilson" <matthew stlsoft.org> wrote in message
news:bkgjv6$2mks$1 digitaldaemon.com...
 Aaargh!

 That won't even compile, since it seems that we can't have a version
clause
 inside an enum.

 Oh unhappy days. :(




 "Matthew Wilson" <matthew stlsoft.org> wrote in message
 news:bkgjrj$2m5f$1 digitaldaemon.com...
 I need/want to define an enum to represent endianness (in order that
people
 can request an endianness to their int in the registry API).

 I've currently defined it in the synsoft.types module as

     public enum Endian
     {
             Unknown      =   0
         ,   Little             =   1
         ,   Big                =   2
         ,   Middle          =   3
         ,   ByteSex        =   4
       version(LittleEndian)
       {
         ,   Ambient        =   Little
       }
       version(BigEndian)
       {
         ,   Ambient        =   Big
       }
     }

 Anyone have any violent objections? Have I missed something obvious? (I
know
 I'm being a little optimistic in imagining D being ported to
middle-endian
 machines, and I don't know whether we'd ever want to go byte-sexual, but
 what the hell!)

 If this is something agreeable, it'd be cool if this could go into
Phobos
 asap, as I don't want any synsoft dependencies in the registry library
when
 it goes into Phobos, and I'm sure you don't either. ;)

 Comments, please
Sep 19 2003
next sibling parent reply "Matthew Wilson" <matthew stlsoft.org> writes:
But then Ambient is not part of Endian!

"Walter" <walter digitalmars.com> wrote in message
news:bkgm7g$2ufv$1 digitaldaemon.com...
 Write it like this:

 enum Endian { .... }

 version (LittleEndian)
 {
     const Endian Ambient = Endian.Little;
 }
 version (BigEndian)
 {
     const Endian Ambient = Endian.Big;
 }

 "Matthew Wilson" <matthew stlsoft.org> wrote in message
 news:bkgjv6$2mks$1 digitaldaemon.com...
 Aaargh!

 That won't even compile, since it seems that we can't have a version
clause
 inside an enum.

 Oh unhappy days. :(




 "Matthew Wilson" <matthew stlsoft.org> wrote in message
 news:bkgjrj$2m5f$1 digitaldaemon.com...
 I need/want to define an enum to represent endianness (in order that
people
 can request an endianness to their int in the registry API).

 I've currently defined it in the synsoft.types module as

     public enum Endian
     {
             Unknown      =   0
         ,   Little             =   1
         ,   Big                =   2
         ,   Middle          =   3
         ,   ByteSex        =   4
       version(LittleEndian)
       {
         ,   Ambient        =   Little
       }
       version(BigEndian)
       {
         ,   Ambient        =   Big
       }
     }

 Anyone have any violent objections? Have I missed something obvious?
(I
 know
 I'm being a little optimistic in imagining D being ported to
middle-endian
 machines, and I don't know whether we'd ever want to go byte-sexual,
but
 what the hell!)

 If this is something agreeable, it'd be cool if this could go into
Phobos
 asap, as I don't want any synsoft dependencies in the registry library
when
 it goes into Phobos, and I'm sure you don't either. ;)

 Comments, please
Sep 19 2003
parent reply Mike Wynn <mike l8night.co.uk> writes:
you can do as you require ... see final verson if you not interested in 
the vast array of possible error msgs from reconfiguring that same code.

Matthew Wilson wrote:
 But then Ambient is not part of Endian!
 
 "Walter" <walter digitalmars.com> wrote in message
 news:bkgm7g$2ufv$1 digitaldaemon.com...
 
Write it like this:

enum Endian { .... }

version (LittleEndian)
{
    const Endian Ambient = Endian.Little;
}
version (BigEndian)
{
    const Endian Ambient = Endian.Big;
}

"Matthew Wilson" <matthew stlsoft.org> wrote in message
news:bkgjv6$2mks$1 digitaldaemon.com...

Aaargh!

That won't even compile, since it seems that we can't have a version
clause
inside an enum.

Oh unhappy days. :(




"Matthew Wilson" <matthew stlsoft.org> wrote in message
news:bkgjrj$2m5f$1 digitaldaemon.com...

I need/want to define an enum to represent endianness (in order that
people
can request an endianness to their int in the registry API).

I've currently defined it in the synsoft.types module as

    public enum Endian
    {
            Unknown      =   0
        ,   Little             =   1
        ,   Big                =   2
        ,   Middle          =   3
        ,   ByteSex        =   4
      version(LittleEndian)
      {
        ,   Ambient        =   Little
      }
      version(BigEndian)
      {
        ,   Ambient        =   Big
      }
    }
I tried .... version( LittleEndian ) { private const int Endian_Ambient = Endian.Little; } else { version( BigEndian ) { private const int Endian_Ambient = Endian.Big; } else { //#error unknown endian static assert(0); } } public enum Endian { Unknown = 0 , Little = 1 , Big = 2 , Middle = 3 , ByteSex = 4 , Ambient = Endian_Ambient } // gives error enumtest.d(2): Endian.Little is not an expression then realising my error changed the int to endian (same error) so tried an alias .... version( LittleEndian ) { // private const Endian Endian_Ambient = Endian.Little; private alias Endian.Little Endian_Ambient; } else { version( BigEndian ) { // private const Endian Endian_Ambient = Endian.Big; private alias Endian.Big Endian_Ambient; } else { //#error unknown endian static assert(0); } } public enum Endian { Unknown = 0 , Little = 1 , Big = 2 , Middle = 3 , ByteSex = 4 , Ambient = Endian_Ambient } big error .... dmd: mtype.c:2685: Expression *TypeEnum::getProperty (Loc, Identifier *): Assertion `sym->memtype' failed. Aborted (linux(RH9) dmd 0.73) so moved the Endian_Ambient from before to after the enum.... public enum Endian { Unknown = 0 , Little = 1 , Big = 2 , Middle = 3 , ByteSex = 4 , Ambient = Endian_Ambient } version( LittleEndian ) { // private const Endian Endian_Ambient = Endian.Little; private alias Endian.Little Endian_Ambient; } else { version( BigEndian ) { // private const Endian Endian_Ambient = Endian.Big; private alias Endian.Big Endian_Ambient; } else { //#error unknown endian static assert(0); } } enumtest.d(9): cannot implicitly convert Endian.Little to int (from the line `, Ambient = Endian_Ambient` ) so changed back to using the const Endian as oposed to alias.... (same error). so I tried a cast public enum Endian { Unknown = 0 , Little = 1 , Big = 2 , Middle = 3 , ByteSex = 4 , Ambient = cast(Endian)Endian_Ambient } version( LittleEndian ) { // private const Endian Endian_Ambient = Endian.Little; private alias Endian.Little Endian_Ambient; } else { version( BigEndian ) { // private const Endian Endian_Ambient = Endian.Big; private alias Endian.Big Endian_Ambient; } else { //#error unknown endian static assert(0); } } but that's no good ... enumtest.d(9): Integer constant expression expected instead of cast(int)(Endian.Little) tried the const Endian ... got the error enumtest.d(9): Integer constant expression expected instead of cast(int)(Endian_Ambient) so thought ... lets use 2 enums (one public one private) private enum BaseEndian { Unknown = 0 , Little = 1 , Big = 2 , Middle = 3 , ByteSex = 4 } version( LittleEndian ) { private const BaseEndian Endian_Ambient = BaseEndian.Little; // private alias BaseEndian.Little Endian_Ambient; } else { version( BigEndian ) { private const BaseEndian Endian_Ambient = BaseEndian.Big; // private alias BaseEndian.Big Endian_Ambient; } else { //#error unknown endian static assert(0); } } public enum Endian { Unknown = BaseEndian.Unknown , Little = BaseEndian.Little , Big = BaseEndian.Big , Middle = BaseEndian.Middle , ByteSex = BaseEndian.ByteSex , Ambient = Endian_Ambient } that give the error enumtest.d(12): BaseEndian.Little is not an expression so resorted to the alias again .... and finally it works! Endian.Ambient is part of the enum. private enum BaseEndian { Unknown = 0 , Little = 1 , Big = 2 , Middle = 3 , ByteSex = 4 } version( LittleEndian ) { // private const BaseEndian Endian_Ambient = BaseEndian.Little; private alias BaseEndian.Little Endian_Ambient; } else { version( BigEndian ) { // private const BaseEndian Endian_Ambient = BaseEndian.Big; private alias BaseEndian.Big Endian_Ambient; } else { //#error unknown endian static assert(0); } } public enum Endian { Unknown = BaseEndian.Unknown , Little = BaseEndian.Little , Big = BaseEndian.Big , Middle = BaseEndian.Middle , ByteSex = BaseEndian.ByteSex , Ambient = Endian_Ambient }
Sep 20 2003
parent "Matthew Wilson" <matthew stlsoft.org> writes:
I think I'll just wait for the compiler fix. ;)

"Mike Wynn" <mike l8night.co.uk> wrote in message
news:bkhkh7$1kfq$1 digitaldaemon.com...
 you can do as you require ... see final verson if you not interested in
 the vast array of possible error msgs from reconfiguring that same code.

 Matthew Wilson wrote:
 But then Ambient is not part of Endian!

 "Walter" <walter digitalmars.com> wrote in message
 news:bkgm7g$2ufv$1 digitaldaemon.com...

Write it like this:

enum Endian { .... }

version (LittleEndian)
{
    const Endian Ambient = Endian.Little;
}
version (BigEndian)
{
    const Endian Ambient = Endian.Big;
}

"Matthew Wilson" <matthew stlsoft.org> wrote in message
news:bkgjv6$2mks$1 digitaldaemon.com...

Aaargh!

That won't even compile, since it seems that we can't have a version
clause
inside an enum.

Oh unhappy days. :(




"Matthew Wilson" <matthew stlsoft.org> wrote in message
news:bkgjrj$2m5f$1 digitaldaemon.com...

I need/want to define an enum to represent endianness (in order that
people
can request an endianness to their int in the registry API).

I've currently defined it in the synsoft.types module as

    public enum Endian
    {
            Unknown      =   0
        ,   Little             =   1
        ,   Big                =   2
        ,   Middle          =   3
        ,   ByteSex        =   4
      version(LittleEndian)
      {
        ,   Ambient        =   Little
      }
      version(BigEndian)
      {
        ,   Ambient        =   Big
      }
    }
I tried .... version( LittleEndian ) { private const int Endian_Ambient = Endian.Little; } else { version( BigEndian ) { private const int Endian_Ambient = Endian.Big; } else { //#error unknown endian static assert(0); } } public enum Endian { Unknown = 0 , Little = 1 , Big = 2 , Middle = 3 , ByteSex = 4 , Ambient = Endian_Ambient } // gives error enumtest.d(2): Endian.Little is not an expression then realising my error changed the int to endian (same error) so tried an alias .... version( LittleEndian ) { // private const Endian Endian_Ambient = Endian.Little; private alias Endian.Little Endian_Ambient; } else { version( BigEndian ) { // private const Endian Endian_Ambient = Endian.Big; private alias Endian.Big Endian_Ambient; } else { //#error unknown endian static assert(0); } } public enum Endian { Unknown = 0 , Little = 1 , Big = 2 , Middle = 3 , ByteSex = 4 , Ambient = Endian_Ambient } big error .... dmd: mtype.c:2685: Expression *TypeEnum::getProperty (Loc, Identifier *): Assertion `sym->memtype' failed. Aborted (linux(RH9) dmd 0.73) so moved the Endian_Ambient from before to after the enum.... public enum Endian { Unknown = 0 , Little = 1 , Big = 2 , Middle = 3 , ByteSex = 4 , Ambient = Endian_Ambient } version( LittleEndian ) { // private const Endian Endian_Ambient = Endian.Little; private alias Endian.Little Endian_Ambient; } else { version( BigEndian ) { // private const Endian Endian_Ambient = Endian.Big; private alias Endian.Big Endian_Ambient; } else { //#error unknown endian static assert(0); } } enumtest.d(9): cannot implicitly convert Endian.Little to int (from the line `, Ambient = Endian_Ambient` ) so changed back to using the const Endian as oposed to alias.... (same error). so I tried a cast public enum Endian { Unknown = 0 , Little = 1 , Big = 2 , Middle = 3 , ByteSex = 4 , Ambient = cast(Endian)Endian_Ambient } version( LittleEndian ) { // private const Endian Endian_Ambient = Endian.Little; private alias Endian.Little Endian_Ambient; } else { version( BigEndian ) { // private const Endian Endian_Ambient = Endian.Big; private alias Endian.Big Endian_Ambient; } else { //#error unknown endian static assert(0); } } but that's no good ... enumtest.d(9): Integer constant expression expected instead of cast(int)(Endian.Little) tried the const Endian ... got the error enumtest.d(9): Integer constant expression expected instead of cast(int)(Endian_Ambient) so thought ... lets use 2 enums (one public one private) private enum BaseEndian { Unknown = 0 , Little = 1 , Big = 2 , Middle = 3 , ByteSex = 4 } version( LittleEndian ) { private const BaseEndian Endian_Ambient = BaseEndian.Little; // private alias BaseEndian.Little Endian_Ambient; } else { version( BigEndian ) { private const BaseEndian Endian_Ambient = BaseEndian.Big; // private alias BaseEndian.Big Endian_Ambient; } else { //#error unknown endian static assert(0); } } public enum Endian { Unknown = BaseEndian.Unknown , Little = BaseEndian.Little , Big = BaseEndian.Big , Middle = BaseEndian.Middle , ByteSex = BaseEndian.ByteSex , Ambient = Endian_Ambient } that give the error enumtest.d(12): BaseEndian.Little is not an expression so resorted to the alias again .... and finally it works! Endian.Ambient is part of the enum. private enum BaseEndian { Unknown = 0 , Little = 1 , Big = 2 , Middle = 3 , ByteSex = 4 } version( LittleEndian ) { // private const BaseEndian Endian_Ambient = BaseEndian.Little; private alias BaseEndian.Little Endian_Ambient; } else { version( BigEndian ) { // private const BaseEndian Endian_Ambient = BaseEndian.Big; private alias BaseEndian.Big Endian_Ambient; } else { //#error unknown endian static assert(0); } } public enum Endian { Unknown = BaseEndian.Unknown , Little = BaseEndian.Little , Big = BaseEndian.Big , Middle = BaseEndian.Middle , ByteSex = BaseEndian.ByteSex , Ambient = Endian_Ambient }
Sep 20 2003
prev sibling next sibling parent reply "Sean L. Palmer" <palmer.sean verizon.net> writes:
You knew it was going to be an uphill battle with making version parseable
in many conceivable parts of the grammar.  ;)

Sean

"Walter" <walter digitalmars.com> wrote in message
news:bkgm7g$2ufv$1 digitaldaemon.com...
 Write it like this:

 enum Endian { .... }

 version (LittleEndian)
 {
     const Endian Ambient = Endian.Little;
 }
 version (BigEndian)
 {
     const Endian Ambient = Endian.Big;
 }

 "Matthew Wilson" <matthew stlsoft.org> wrote in message
 news:bkgjv6$2mks$1 digitaldaemon.com...
 Aaargh!

 That won't even compile, since it seems that we can't have a version
clause
 inside an enum.

 Oh unhappy days. :(




 "Matthew Wilson" <matthew stlsoft.org> wrote in message
 news:bkgjrj$2m5f$1 digitaldaemon.com...
 I need/want to define an enum to represent endianness (in order that
people
 can request an endianness to their int in the registry API).

 I've currently defined it in the synsoft.types module as

     public enum Endian
     {
             Unknown      =   0
         ,   Little             =   1
         ,   Big                =   2
         ,   Middle          =   3
         ,   ByteSex        =   4
       version(LittleEndian)
       {
         ,   Ambient        =   Little
       }
       version(BigEndian)
       {
         ,   Ambient        =   Big
       }
     }

 Anyone have any violent objections? Have I missed something obvious?
(I
 know
 I'm being a little optimistic in imagining D being ported to
middle-endian
 machines, and I don't know whether we'd ever want to go byte-sexual,
but
 what the hell!)

 If this is something agreeable, it'd be cool if this could go into
Phobos
 asap, as I don't want any synsoft dependencies in the registry library
when
 it goes into Phobos, and I'm sure you don't either. ;)

 Comments, please
Sep 19 2003
parent reply "Matthew Wilson" <matthew stlsoft.org> writes:
Yes, but this seems a pretty simple, and quite important, one.

    Over to you, big W.
    Relieve my burden, give me version
    In my enum, or I'll kick your bum!

(I used to write limericks in a previous life. Not very good ones, mind ...)


"Sean L. Palmer" <palmer.sean verizon.net> wrote in message
news:bkgmub$30bt$1 digitaldaemon.com...
 You knew it was going to be an uphill battle with making version parseable
 in many conceivable parts of the grammar.  ;)

 Sean

 "Walter" <walter digitalmars.com> wrote in message
 news:bkgm7g$2ufv$1 digitaldaemon.com...
 Write it like this:

 enum Endian { .... }

 version (LittleEndian)
 {
     const Endian Ambient = Endian.Little;
 }
 version (BigEndian)
 {
     const Endian Ambient = Endian.Big;
 }

 "Matthew Wilson" <matthew stlsoft.org> wrote in message
 news:bkgjv6$2mks$1 digitaldaemon.com...
 Aaargh!

 That won't even compile, since it seems that we can't have a version
clause
 inside an enum.

 Oh unhappy days. :(




 "Matthew Wilson" <matthew stlsoft.org> wrote in message
 news:bkgjrj$2m5f$1 digitaldaemon.com...
 I need/want to define an enum to represent endianness (in order that
people
 can request an endianness to their int in the registry API).

 I've currently defined it in the synsoft.types module as

     public enum Endian
     {
             Unknown      =   0
         ,   Little             =   1
         ,   Big                =   2
         ,   Middle          =   3
         ,   ByteSex        =   4
       version(LittleEndian)
       {
         ,   Ambient        =   Little
       }
       version(BigEndian)
       {
         ,   Ambient        =   Big
       }
     }

 Anyone have any violent objections? Have I missed something obvious?
(I
 know
 I'm being a little optimistic in imagining D being ported to
middle-endian
 machines, and I don't know whether we'd ever want to go byte-sexual,
but
 what the hell!)

 If this is something agreeable, it'd be cool if this could go into
Phobos
 asap, as I don't want any synsoft dependencies in the registry
library
 when
 it goes into Phobos, and I'm sure you don't either. ;)

 Comments, please
Sep 19 2003
parent "Walter" <walter digitalmars.com> writes:
"Matthew Wilson" <matthew stlsoft.org> wrote in message
news:bkgncj$b2$1 digitaldaemon.com...
     Over to you, big W.
     Relieve my burden, give me version
     In my enum, or I'll kick your bum!

 (I used to write limericks in a previous life. Not very good ones, mind
...) Good thing you switched careers!
Sep 21 2003
prev sibling next sibling parent reply "Matthew Wilson" <matthew stlsoft.org> writes:
For the moment I'd satisfying myself with


version(LittleEndian)
{
 private const int Endian_Ambient =   1;
}
version(BigEndian)
{
 private const int Endian_Ambient =   2;
}


public enum Endian
{
        Unknown =   0
    ,   Little  =   1
    ,   Big     =   2
    ,   Middle  =   3
    ,   ByteSex =   4
    ,   Ambient =   Endian_Ambient
/+
  version(LittleEndian)
  {
    ,   Ambient =   Little
  }
  version(BigEndian)
  {
    ,   Ambient =   Big
  }
+/
}

It's not pretty, but it works.

Anyway, to the second part of the question. Is this something we'd like to
see in Phobos, perhaps in "d.arch.types"?

"Walter" <walter digitalmars.com> wrote in message
news:bkgm7g$2ufv$1 digitaldaemon.com...
 Write it like this:

 enum Endian { .... }

 version (LittleEndian)
 {
     const Endian Ambient = Endian.Little;
 }
 version (BigEndian)
 {
     const Endian Ambient = Endian.Big;
 }

 "Matthew Wilson" <matthew stlsoft.org> wrote in message
 news:bkgjv6$2mks$1 digitaldaemon.com...
 Aaargh!

 That won't even compile, since it seems that we can't have a version
clause
 inside an enum.

 Oh unhappy days. :(




 "Matthew Wilson" <matthew stlsoft.org> wrote in message
 news:bkgjrj$2m5f$1 digitaldaemon.com...
 I need/want to define an enum to represent endianness (in order that
people
 can request an endianness to their int in the registry API).

 I've currently defined it in the synsoft.types module as

     public enum Endian
     {
             Unknown      =   0
         ,   Little             =   1
         ,   Big                =   2
         ,   Middle          =   3
         ,   ByteSex        =   4
       version(LittleEndian)
       {
         ,   Ambient        =   Little
       }
       version(BigEndian)
       {
         ,   Ambient        =   Big
       }
     }

 Anyone have any violent objections? Have I missed something obvious?
(I
 know
 I'm being a little optimistic in imagining D being ported to
middle-endian
 machines, and I don't know whether we'd ever want to go byte-sexual,
but
 what the hell!)

 If this is something agreeable, it'd be cool if this could go into
Phobos
 asap, as I don't want any synsoft dependencies in the registry library
when
 it goes into Phobos, and I'm sure you don't either. ;)

 Comments, please
Sep 19 2003
parent "Walter" <walter digitalmars.com> writes:
"Matthew Wilson" <matthew stlsoft.org> wrote in message
news:bkgnhr$uv$1 digitaldaemon.com...
 Anyway, to the second part of the question. Is this something we'd like to
 see in Phobos, perhaps in "d.arch.types"?
I don't know. By itself, I don't think it offers enough.
Sep 21 2003
prev sibling parent reply "Nicolas Repiquet" <deadcow-remove-this free.fr> writes:
"Walter" <walter digitalmars.com> a écrit dans le message news:
bkgm7g$2ufv$1 digitaldaemon.com...
 Write it like this:

 enum Endian { .... }

 version (LittleEndian)
 {
     const Endian Ambient = Endian.Little;
 }
 version (BigEndian)
 {
     const Endian Ambient = Endian.Big;
 }
Cant you add to d's expressions set something like "VersionExpression : version ( Identifier | Integer )" that return a constant boolean ? So the following code will works : const Endian Ambient = version(LittleEndian) ? Endian.Little : Endian.Big ; Maybe "DebugExpression : debug ( Identifier | Integer )" may be added too ? -- Nicolas Repiquet
Sep 20 2003
parent "Nicolas Repiquet" <deadcow-remove-this free.fr> writes:
"Nicolas Repiquet" <deadcow-remove-this free.fr> a écrit dans le message
news: bki884$2ejv$1 digitaldaemon.com...

    const Endian Ambient = version(LittleEndian) ? Endian.Little :
Endian.Big
 ;
i mean enum Endian { Little, Big, Ambient = version(LittleEndian) ? Little : Big } -- Nicolas Repiquet
Sep 20 2003