Multi-Type Enumerations

"Nordlöw" per.nordlow at gmail.com
Tue Apr 15 14:00:36 PDT 2014


Could somebody, please, give me some enlightening examples of 
when it can be useful to have a enumerators with different types 
such as in

enum {
   A = 1.2f,  // A is 1.2f of type float
   B,         // B is 2.2f of type float
   int C = 3, // C is 3 of type int
   D          // D is 4 of type int
}

show in

http://dlang.org/enum.html

I guess my mind hasn't expanded beyond the C limitations in this 
regard ;)


More information about the Digitalmars-d-learn mailing list