Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site pur-ee.UUCP Path: utzoo!linus!decvax!harpo!ihnp4!inuxc!pur-ee!iuvax!apratt From: apratt@iuvax.UUCP Newsgroups: net.lang.c Subject: if vs ?: - (nf) Message-ID: <1593@pur-ee.UUCP> Date: Wed, 15-Feb-84 08:15:37 EST Article-I.D.: pur-ee.1593 Posted: Wed Feb 15 08:15:37 1984 Date-Received: Thu, 16-Feb-84 06:02:11 EST Sender: notes@pur-ee.UUCP Organization: Electrical Engineering Department , Purdue University Lines: 27 #N:iuvax:9500002:000:555 iuvax!apratt Feb 15 00:44:00 1984 In reading through the Lattice C manual, I came across the note that the compiler detects and discards statements like i+j; which have no side effects. This brings to mind the fact that any expression is a legal statement. With that in mind, can anybody tell me the likely difference between if ( i ) j++; else k++; and i ? j++ : k++ ; ...? Surely there will be differences in the compiled code.. Can somebody tell me what they are likely to be? ---- "Can YOU whistle at 300 baud?" -- Allan Pratt ...decvax!ihnp4!inuxc!iuvax!apratt