Date: Mon, 2 Apr 2007 22:27:20 -0700
Reply-To: David L Cassell <davidlcassell@MSN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: David L Cassell <davidlcassell@MSN.COM>
Subject: Re: Inequality of Inequality Operators
In-Reply-To: <040220072345.5196.461195A800020F1E0000144C220076143805029A06CE9907@comcast.net>
Content-Type: text/plain; format=flowed
iw1junk@COMCAST.NET sagely replied:
>Summary: Historical reasons
>#iw-value=1
>
>Ed,
>
>The move from Version 5 to 6 involved porting PL1 to C code so some
>inconsistencies were introduced by an army of new programmers not so
>familiar with SAS. But in this case it is an impossible problem.
>
>In version 5 the symbol, <>, always meant the MAX operator. Version 6
>introduced PROC SQL. ANSI SQL requires the symbol <> to mean not equal.
>The implementation of SQL influenced the language. (I have always thought
>the influence on SAS more significant than that of other languages.) In
>particular the WHERE option was so neat that they put into all of the
>language, essentially porting the function used in SQL to SAS. Now which
>inconsistency would you choose?
>
> 1) <> means different things in SAS WHERE than PROC SQL WHERE
> 2) <> means the same things in SAS WHERE as PROC SQL WHERE
> 3) <> no longer means max breaking all previous versions
>
>Since the WHERE was lifted whole out of PROC SQL there are a lot of
>features (like like) in WHERE options and statements that can not be used
>in SAS code. Would you throw away all this good stuff or risk changing
>the basic language? Since WHERE is a pretty closed context, I think they
>made the right decision to be consistent in WHEREs.
>
>On the other hand, if you make enough inconsistencies, a time comes to
>start a new language.
>
>Ian Whitlock
I personally thought that the SAS programmers made an optimal choice.
They had to protect already-written code, and also step up to the SQL
standard too.
As for your last comment:
>On the other hand, if you make enough inconsistencies, a time comes to
>start a new language.
That never stopped Perl or C++
David
--
David L. Cassell
mathematical statistician
Design Pathways
3115 NW Norwood Pl.
Corvallis OR 97330
>===============
>
>Date: Mon, 2 Apr 2007 14:41:26 -0400
>Reply-To: Ed Heaton <EdHeaton@WESTAT.COM>
>Sender: "SAS(r) Discussion"
>From: Ed Heaton <EdHeaton@WESTAT.COM>
>Subject: Re: Inequality of Inequality Operators
>Comments: To: toby dunn <tobydunn@hotmail.com>, Ken.Barz@INTRADO.COM
>In-Reply-To: <BAY123-F123AE9BF34133478122B70DE600@phx.gbl>
>Content-Type: text/plain; charset="us-ascii"
>
>Interestingly enough, <> means 'not equal' in a WHERE statement and in a
>WHERE= dataset option, just not in an IF statement.
>
>Data foo ; x = -1 ; y = 0 ; Run ; Data new ; Set foo ; If ( x <> y ) ; Run
>; Data new ; Set foo( where=( x <> y ) ) ; Run ; Data new ; Set foo ; Where
>( x <> y ) ; Run ;
>
>Yes, I love SAS. But just like a son, sometimes I wander about it!
>
>Ed
>
>Edward Heaton, Senior Systems Analyst, Westat (An Employee-Owned Research
>Corporation), 1650 Research Boulevard, RW-4541, Rockville, MD 20850-3195
>Voice: (301) 610-4818 Fax: (301) 294-3879 mailto:EdHeaton@Westat.com
>http://www.Westat.com
>
>
><SNIP>
_________________________________________________________________
Need a break? Find your escape route with Live Search Maps.
http://maps.live.com/?icid=hmtag3
|