www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/01/21:35:41

From: clc5q AT cobra DOT cs DOT Virginia DOT EDU (Clark L. Coleman)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: short circuit evaluation
Date: 2 Apr 1999 01:46:56 GMT
Organization: University of Virginia
Lines: 35
Message-ID: <7e17ig$fab$1@murdoch.acc.Virginia.EDU>
References: <7dqv06$81b$1 AT fe1 DOT cs DOT interbusiness DOT it> <37035dc9 DOT 12582870 AT news DOT snafu DOT de>
NNTP-Posting-Host: cobra.cs.virginia.edu
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

In article <37035dc9 DOT 12582870 AT news DOT snafu DOT de>,
Horst Kraemer <horst DOT kraemer AT snafu DOT de> wrote:
>On Tue, 30 Mar 1999 18:49:55 +0200, "Bonifati" <abonifati AT telsa DOT it>
>wrote:
>
>> I'm a beginner in C.
>> I need to disable/enable complete bool eval in RHide.
>> I have found nothing about short circuit evaluation in rhide or djgpp
>> manuals.
>> what's the trick?
>
>
>You don't need it and there is no trick. Complete boolean evaluation
>has never existed in C and will never exist.
>
>If you would need full evaluation once a year, you would write
>
>	i = f();
>	if (i || g()) /* or  if (i && g()) */

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

????



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019