chip@tct.uucp (Chip Salzenberg) (09/07/90)
According to joare@sdata.no: > return f() || g(); Perl also has the LISP meaning for this operation. This C equivalent is too verbose: > a = f(); > if (a) > return a; > else > return g(); Try instead: return (a = f()) ? a : g(); Note that GNU CC has a ?: operator where the second operand defaults to the value of the first operand. So with GNU CC, you can write: return f() ?: g(); Followups to alt.lang.cfutures. -- Chip Salzenberg at Teltronics/TCT <chip@tct.uucp>, <uunet!pdn!tct!chip>