[sv-bc] default initial values

From: Paul Graham <pgraham_at_.....>
Date: Mon Aug 22 2005 - 13:51:22 PDT
Several places in p1800 refer to the "default initial value"
of an enum type.  I don't see where this default initial
value is defined.

I'm guessing that since an enum declaration starts at zero
unless other specified, that zero is the default initial
value.  But then what about an enum like:

    enum {red = 3, green, blue};

Can we say that the default initial value for an enum type T
is just T.first()?  Specifically, can we add to section 4.10
a sentence reading:

    The default initial value of an enum type is the value of 
    the type's leftmost literal.

Also, while we're at it, do the next() and prev() methods
have a defined value when N == 0?  I would guess that
X.next(0) == X.

Paul
Received on Mon Aug 22 13:51:32 2005

This archive was generated by hypermail 2.1.8 : Mon Aug 22 2005 - 13:54:14 PDT