Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site iuvax.UUCP
Path: utzoo!linus!decvax!harpo!ihnp4!inuxc!iuvax!saj
From: saj@iuvax.UUCP
Newsgroups: net.lang.c
Subject: if vs ?: - (nf)
Message-ID: <120@iuvax.UUCP>
Date: Wed, 15-Feb-84 15:12:22 EST
Article-I.D.: iuvax.120
Posted: Wed Feb 15 15:12:22 1984
Date-Received: Thu, 16-Feb-84 06:07:32 EST
Sender: saj@iuvax.UUCP
Organization: Indiana U, Bloomington
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