Default.

Duk Bekema duk at vu44.UUCP
Fri Jun 22 14:21:09 AEST 1984


In what place in the manual is stated that default (and case)
belongs to the nearest enclosing switch?
Of course, it is logical, it is exactly what I want, and I've
never thought otherwise; but I just can't find it.

This piece of program will print `Got here':

	switch (3) {
	default:
		if (0) {
		case 3:	printf("Got here\n");
			break;
		}
		break;
	}

but this piece won't:

	switch (3) {
	default:
		switch (0) {
		case 3:	printf("Got here\n");
			break;
		}
		break;
	}

				Duk Bekema
				..!mcvax!vu44!duk



More information about the Comp.lang.c mailing list