enumswitch.c

sima/test/enumswitch.c · 235 B

From the archive 970706-sima.tgz

Download the archive   « Back to the archive contents

enum alignment {good, evil, a1, a2, a3, a4, a5} a;
void f() {
    switch(a) {
	case good:
        case a3: case a4:
	  printf("good\n");
	  break;
	case evil:
	case a2:
	  printf("evil\n");
	  break;
	case a1: case a5:
	  s();
    }
}

Site Stats

Snippets: 1791
Codebases: 571