Sender: nate AT cartsys DOT com Message-ID: <37AF5D2E.A2999C57@cartsys.com> Date: Mon, 09 Aug 1999 15:58:54 -0700 From: Nate Eldredge X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.11pre6 i586) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: More then one truth value in switch? References: <199908072328 DOT TAA00432 AT delorie DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Dan Gold wrote: > > I don't know how to detect if more than one truth statement with a switch > could someone tell me. > I want to do something like > > switch (ch) { > > case 'e' && 'a': > > or is it something like > > case 'e': no break... > case 'a': code.... The latter. One normally writes something like: switch (c) { case 'e': case 'a': /* code... */ break; }; The first case would compile, but would be equivalent to `case 1:', since the constants 'e' and 'a' are both nonzero. -- Nate Eldredge nate AT cartsys DOT com