A cute macro

Steven Maurer steven at qubix.UUCP
Tue May 15 15:24:49 AEST 1984


References:

    Having trouble remembering to break out of a case statement?

    Try this:

    #define when break;case
    #define otherwise break;default

    Thus you can write

	case (I) {
	    when  'a': 
	    when  'b': 
	    when  'c': 
	    otherwise:
	    }

    Steven Maurer



More information about the Comp.lang.c mailing list