if vs ?: - (nf)

saj at iuvax.UUCP saj at iuvax.UUCP
Thu Feb 16 06:12:22 AEST 1984

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
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 )


	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

More information about the Comp.lang.c mailing list