enum X { A=3, B=1, C } void main() { foreach(e;X) writefln(e.stringof," = ",e); } //X.A = 3 //X.B = 1 //X.C = 2 or //X.B = 1 //X.C = 2 //X.A = 3