LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 1997, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 31 Oct 1997 18:29:02 PST
Reply-To:     TWB2%Rates%FAR@bangate.pge.com
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Tim Berryhill 3rd time <TWB2%Rates%FAR@BANGATE.PGE.COM>
Subject:      Re: Comments on SASWare Ballot
Comments: To: billyk@FROYA.BOAT.WASHINGTON.EDU

William, Be careful. I am currently working with some code which takes advantage of SAS considering any value greater than 0 to be true. With values like A=7 and B=.03, A is true and B is true while A^=B is true (when many people would consider A xor B to be false).

Tim Berryhill - Contract Programmer and General Wizard TWB2@PGE.COM or http://www.aartwolf.com/twb.html Frequently at Pacific Gas & Electric Co., San Francisco The correlation coefficient between their views and my postings is slightly less than 0 ----------------------[Reply - Original Message]----------------------

Sent by:"William Kreuter" <billyk@FROYA.BOAT.WASHINGTON.EDU> In article <3.0.3.32.19971028224110.0069b6e8@mail.crl.com>, Jack Hamilton <jfh@ALUMNI.STANFORD.ORG> writes:

> My comments on some of the items on the SASWare Ballot. > 28 provide a method for the OR operator to > differentiate between both conditions being > true and one of the conditions being true > VOTE: Abstain > COMMENT: This probably means "or" vs. "exclusive or". > WORKAROUND: "if A xor B" can be coded as > "if (A and not B) or (B and not A)".

No, no, no. Exclusive or should be coded as:

if A^=B

Two or three times in the past several years, I've posted an article on sas-l entitled, "Make Your Own Logical Operators." I discuss the most efficient ways to implement exclusive or, as well as all other possibilities from a truth table. I'll gladly send this on request to anyone interested, or if there seems to be interest, I'll post it again.

-- William Kreuter, Senior Computer Specialist, University of Washington Ctr. for Cost & Outcomes Research, 146 N. Canal St. #300, Seattle, WA 98103 billyk@u.washington.edu http://weber.u.washington.edu/~billyk/ voice or voice mail: 206-543-5007 fax: 206-543-5318 mailstop: 358853

=====================================================================


Back to: Top of message | Previous page | Main SAS-L page