Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!ncar!noao!asuvax!nud!sunburn!gtx!randy From: randy@gtx.com (Randy D. Miller) Newsgroups: comp.lang.c Subject: Question about int result of relational operator Message-ID: <787@gtx.com> Date: 1 Nov 88 16:33:45 GMT Reply-To: randy@gtx.UUCP (Randy D. Miller) Distribution: na Organization: GTX Corporation, Phoenix, Arizona Lines: 15 I've seen conflicting information about the int result of a relational operator in which the condition is satisfied. Does it evaluate to exactly one, or just "non-zero" ? E.g., can we test whether two comparisons have the same relational result with the following ? (Obviously there are other ways of doing this, but that is not the question here.) int a,b,c,d; if ((a > b) == (c > d)) { /* both tests have the same relational result */ } -- Randy D. Miller (602) 870-1696 GTX Corp., 8836 N. 23rd Ave., Phoenix, AZ 85021 {cbosgd,decvax,hplabs,amdahl,nsc}!sun!sunburn!gtx!randy