Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 20 Jul 2012 19:29:46 -0500 Message-ID: <5009F7F6.C47@mindspring.com> Date: Fri, 20 Jul 2012 20:29:42 -0400 From: pete Reply-To: pfiland@mindspring.com Organization: PF X-Mailer: Mozilla 3.04Gold (WinNT; I) MIME-Version: 1.0 Newsgroups: comp.lang.c Subject: Re: What shall return "0.0 ? 1 : 0" ? References: Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Lines: 22 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 4.156.228.221 X-Trace: sv3-xkHafYKwCgF2aZvDzzSIGcSfcAh51KiJG/67yAMnQhjXdENoepSKagp6dsdLul/HwNdU2vew70j7ofh!LkKP0/IXhcbGeqWmDdaly0ezJMpGvUmTV/aGMiJvA3xnt7LQttgMBH2bRskwM8gerNOwHhi03VbW!Lji6nYYWTw== X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1820 Xref: csiph.com comp.lang.c:23469 Keith Thompson wrote: > > ram@zedat.fu-berlin.de (Stefan Ram) writes: > > Xavier Roche writes: > >>Is there a C standard expert who can confirm what shall return > >>0.0 ? 1 : 0 > > > > An expression does not return. A function may return. After > > > > int f(){ return 0.0 ? 1 : 0; { > > > > , we can say that f »shall return 0.0 ? 1 : 0«. > > An expression *yields* a value. (I think earlier versions of the > standard used the word "return" for the results of expressions in > some places; as far as I know it's been cleaned up.) Section "6.5 Expressions" in both C89 and in C99, described the bitwise operators as returning values. -- pete