Message-Id: <199904021259.HAA32513@delorie.com> Comments: Authenticated sender is From: "George Foot" To: clc5q AT cobra DOT cs DOT Virginia DOT EDU (Clark L. Coleman) Date: Fri, 2 Apr 1999 13:57:15 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: short circuit evaluation CC: djgpp AT delorie DOT com X-mailer: Pegasus Mail for Win32 (v2.42a) Reply-To: djgpp AT delorie DOT com On 2 Apr 99 at 1:46, Clark L. Coleman wrote: > How does this force full evaluation? Shouldn't he try: > > i = f(); > j = g(); > if (i || j) > > > wherever he wanted a full evaluation of: > > if (f() || g()) Yes; or, if you don't want to use those variables: if ( (f()?1:0) | (g()?1:0) ) ... if ( (f()?1:0) & (g()?1:0) ) ... -- George