httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Havard" <bri...@kheldar.apana.org.au>
Subject RE: cvs commit: apache-2.0/src/main http_protocol.c
Date Mon, 09 Oct 2000 04:44:21 GMT
On Sun, 8 Oct 2000 16:00:41 -0500, William A. Rowe, Jr. wrote:

>> From: Greg Stein [mailto:gstein@lyra.org]
>> Sent: Sunday, October 08, 2000 2:56 PM
 
>> Untrue. At the machine language level, a conditional test may 
>> produce -1, but C produces 0 or 1. Always has.
>
>Then I retract...  I was looking at code 20 minutes before I had
>to teach, my brain wasn't all here.  I have always avoided relying
>on a non-zero value being anything in particular, and has always
>been a -big-red-flag- in my book, and yes, Greg, I do asm :-)

Maybe you were thinking of other languages. EG Some BASICs return -1 for
true.

Oh, and a really don't see the point of using '\0', it's exactly the same
as 0. I know the argument for it (makes it obvious you're comparing a
character) but do you write 0.0 when comparing a float? 0L when comparing a
long?

-- 
 ______________________________________________________________________________
 |  Brian Havard                 |  "He is not the messiah!                   |
 |  brianh@kheldar.apana.org.au  |  He's a very naughty boy!" - Life of Brian |
 ------------------------------------------------------------------------------


Mime
View raw message