Path: utzoo!utgpu!water!watmath!clyde!rutgers!mit-eddie!uw-beaver!uw-june!pardo From: pardo@uw-june.cs.washington.edu (David Keppel) Newsgroups: comp.lang.c Subject: Re: "logical" xor Message-ID: <3986@uw-june.cs.washington.edu> Date: 13 Jan 88 23:44:57 GMT References: <2946@zeus.TEK.COM> <170@illusion.UUCP> <39a83409.ae48@apollo.uucp> Reply-To: pardo@uw-june.UUCP (David Keppel) Organization: U of Washington, Computer Science, Seattle Lines: 8 [Ken Arnold says: (a != b) could evaluate to 7 ] Unless this has been changed from K&R in ANSI, (a != b) must evaluate to 0 or 1. Check K&R Appendix A, Sections 7.6, 7.7, 7.11, 7.12. Relational, equality, and logical AND and OR are guaranteed by this section to return only 0 and 1. ;-D on (And it isn't even my copy of K&R!) Pardo