Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!cwjcc!gatech!rutgers!att!ihlpl!knudsen From: knudsen@ihlpl.ATT.COM (Knudsen) Newsgroups: comp.lang.c Subject: Re: down Summary: Booleans are indeed 1 or 0 ! Message-ID: <8158@ihlpl.ATT.COM> Date: 14 Dec 88 17:16:44 GMT References: <349@greens.UUCP> Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 16 In article <349@greens.UUCP>, matthew@sunpix.UUCP ( Sun NCAA) writes: > (Before closing, there is one logic flaw in your scrap of code. '(c == '\n')' > does not have to evaluate to an integer 1. It must only be a non-zero value if > true.) Hey! Didn't we just finish the perennial discussion of whether C uses integer 1 for TRUE boolean expressions, or just some non-zero value? The conclusion was (and was the last time) that Boolean expressions, when required to cough up a value (as opposed to just switching control in IF statements) do indeed return exactly 1 for TRUE. In fact, Moses K. and Jesus R. said so. -- Mike Knudsen Bell Labs(AT&T) att!ihlpl!knudsen "Lawyers are like nuclear bombs and PClones. Nobody likes them, but the other guy's got one, so I better get one too."