Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site sdcc6.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!ittvax!dcdwest!sdcsvax!sdcc6!ix269
From: ix269@sdcc6.UUCP
Newsgroups: net.lang.c
Subject: Re: Which is better?
Message-ID: <1840@sdcc6.UUCP>
Date: Wed, 19-Dec-84 05:23:09 EST
Article-I.D.: sdcc6.1840
Posted: Wed Dec 19 05:23:09 1984
Date-Received: Fri, 21-Dec-84 00:37:28 EST
References: <13900013@acf4.UUCP> <291@rlgvax.UUCP>
Reply-To: ix269@sdcc6.UUCP (Jim)
Organization: U.C. San Diego, Academic Computer Center
Lines: 27
Summary: 

fig()

Might it be noted that if-else pairs are accepted as one statement?
Break is a jump (not machine phrase) out of the switch, so the big
question ends up being will your optimizer discover that one of the 
conditionals is jumping twice (if-else as aversed to if-break-break)?
The source code for the if-else is better looking, and perhaps even
the cost of an extra jump might not be worth the ugliness (unless this
is a kernal ugly).  This leaves things in a different light than merely 
style, but welcome to a higher level language :-).

switch (A) {
	case 0:
		if (B) {
			/* this */
		break;
		}
		/* else */
		break;
	case 1:
		if (B) {
			/* this */
		} else {
			/* that */
		}
		break;
}