Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!cmcl2!harvard!seismo!ll-xn!caip!lll-crg!lll-lcc!well!rab From: rab@well.UUCP (Bob Bickford) Newsgroups: net.lang.c Subject: Re: An amusing piece of code Message-ID: <909@well.UUCP> Date: Thu, 10-Apr-86 07:33:22 EST Article-I.D.: well.909 Posted: Thu Apr 10 07:33:22 1986 Date-Received: Mon, 14-Apr-86 03:19:08 EST References: <1370@ism780c.UUCP> Organization: Whole Earth Lectronic Link, Sausalito, CA Lines: 33 Summary: an alternate solution ,,,, How about this: Switch (thing) case A: A-code; break; case B: case C: case D: BCD common code switch (thing) case B: B code; break; case C: C code; break; case D: D code; break; break; case E: E code; break; Of course, the inner switch and the BCD common code can be swapped if the order of execution is crucial. I didn't like your example code because I found it too hard to follow the logic, with the brackets placed in that way, which I gather is what you were looking for a solution for.... -- Robert Bickford {lll-crg,hplabs}!well!rab