Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!caip!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: net.lang.c Subject: Re: generalized switch Message-ID: <2765@brl-smoke.ARPA> Date: Sun, 3-Aug-86 15:30:01 EDT Article-I.D.: brl-smok.2765 Posted: Sun Aug 3 15:30:01 1986 Date-Received: Mon, 4-Aug-86 01:27:59 EDT References: <15093@ucbvax.BERKELEY.EDU> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 19 In article <15093@ucbvax.BERKELEY.EDU> kos@ernie.Berkeley.EDU (Joshua Kosman) writes: > switch() { > case : > etc. > } >... >Any ideas? In C, such code is written: if ( bool_expr_1 ) action_1 else if ( bool_expr_2 ) action_2 else if ... else default_action You could come up with some CPP macros for this, but why bother?