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 1996, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 9 Oct 1996 17:59:06 +0100
Reply-To:   John Whittington <johnw@MAG-NET.CO.UK>
Sender:   "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:   John Whittington <johnw@MAG-NET.CO.UK>
Subject:   Re: 'Proper' use of IF-THEN-ELSE (was IF-THEN-ELSEs in a DATA step)
Comments:   To: Don Stanley <don_stanley@IBM.NET>

On Wed, 9 Oct 1996, Don Stanley <don_stanley@IBM.NET> wrote:

>Its a well accepted and clearly defined and taught axiom of computer >programming in virtually any language that IF an ELSE is available THEN >you use it. I find that the syntax without an else is confusing, and its >impact on efficiency can be enormous .... >I've always been of the opinion that omitting the else is similar to >using goto's. There are ALMOST always good reasons for not doing it.

I agree, within the context which you presumably (silently!) implied, but there are obviously plenty of situations in which a DATA step will have multiple IF statements with conditions which are *not* mutually exclusive, so that use of an ELSE (or SELECT) is just plain wrong.

Regards,

John

----------------------------------------------------------- Dr John Whittington, Voice: +44 1296 730225 Mediscience Services Fax: +44 1296 738893 Twyford Manor, Twyford, E-mail: johnw@mag-net.co.uk Buckingham MK18 4EL, UK CompuServe: 100517,3677 -----------------------------------------------------------


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