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 (March 2006, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 27 Mar 2006 08:37:03 +0000
Reply-To:   Guido T <cymraeg_erict@HOTMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Guido T <cymraeg_erict@HOTMAIL.COM>
Subject:   Re: Q: Evaluation of conditional expressions
Comments:   To: Jim Groeneveld <jim2stat@YAHOO.CO.UK>
Content-Type:   text/plain; charset="iso-8859-1"

> Date: Mon, 27 Mar 2006 03:20:15 -0500> From: jim2stat@YAHOO.CO.UK> Subject: Q: Evaluation of conditional expressions> To: SAS-L@LISTSERV.UGA.EDU> > Hi friends,> > Suppose x = 1 and y = 2, then what would the conditional expression> IF (X EQ 0 AND Y EQ 0)> in a data step do? X is not 0, the evaluation of the first part yields> false, so the whole condition is not true, but is the condition Y EQ 0> evaluated as well? It is my impression it is not, but I am not sure. Where> can I find this in the docs?> > Regards - Jim.> --> Jim Groeneveld, Netherlands> Statistician, SAS consultant> home.hccnet.nl/jim.groeneveld Hi Jim, The second part doesn't appear to be evaluated unless the first part if true. Try setting Y to missing and performing some arithmatic on it say "(Y+0) EQ 0" to cause a possible NOTE in the log. You will get a missing value note in the log when X is 0, but no note when X is 1. Regards ++ Guido _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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