D语言命名枚举

import std.stdio;

// Initialized sun with value 1 
enum Days { sun = 1, mon, tue, wed, thu, fri, sat };

int main(string[] args) { 
   writefln(Min : %d, Days.min); 
   writefln(Max : %d, Days.max);
   writefln(Size of: %d, Days.sizeof); 
   return 0; 
}

相关文章

// ------------------- import std.stdio; void main(str...
import std.stdio; int main () { /* local variable defi...
import std.stdio; int main(string[] args) { int a = 20...
import std.stdio; int main(string[] args) { int a = 4;...
import std.stdio; int main(string[] args) { int a = 21;...
import std.stdio; int main(string[] args) { uint a = 60...