Date: Thu, 27 Oct 2005 15:07:55 -0400
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Frank Schiffel <dhssresearcher@NETSCAPE.NET>
Subject: Re: Finding data in a table for a column
Content-Type: text/plain; charset=iso-8859-1
I heard Ron Fehd was a Ferengi clone. that was on a DSN Star Trek episode.
Something about DARPA having a Bush / Gore prototype that was outlawed in 2010...Arthur Tabachneck <art297@NETSCAPE.NET> wrote:
>Our other AI bot (David) has been a lot more consistent than the second one
>(Toby). Both continue to provide very human appearing responses, but David
>has always appeared to be more highly trained and experienced, not to
>mention more prolific. Upon reading it's latest response, I almost sent it
>a thank you note.
>What was the difference in their programming?
>P.S. Hopefully, I haven't accidentally posted this to the list. I don't
>think anyone has caught on yet regarding David.
>"David L Cassell" <davidlcassell@MSN.COM> wrote in message
>> depuy001@NOTES.DUKE.EDU replied:
>> >I admit to being a little confused by your example . . .
>> >so for the first record, you have 3 variables (a, b,c) and a count
>> >The value of a is x1, the value of b is x2, and the value of c is x3.
>> >To answer what I *think* you're asking, you want to do something like . .
>> >data file2;
>> > set file1;
>> > if count=1 then do;
>> > a=1; b=2; c=3; end;
>> > else if count=2 then do;
>> > a=4; b=5; c=6; end;
>> > else if count=3 then do;
>> > a=7; b=8; c=9; end;
>> > run;
>> >I see no way to simplify it if you want different activities for each
>> >value of Count.
>> >Using if/then/else instead of lots of if/then is more efficient, although
>> >that may not be a concern with a small data set.
>> >if you can combine results, ie if 5 < count < 10 then do; . . . ; end;
>> >if count=2 or count=3 then do; . . . ; end; it would make it easier.
>> >specific coding for those examples:
>> >if count > 5 and count < 10 then do; a=1; b=2; c=3; end;
>> >if count in (2,3) then do; a=1; b=2; c=3; end;
>> >As far as the code you gave (which I assume was just an oversight of the
>> >moment), you assigned "a" to have the value x1, then in your do step,
>> >assigned the variable x1 to equal x2. If x2 is not already a variable,
>> >would think you're trying to create the variable x1 and give it the
>> >character string x2 as a value . . . if you really wanted to do that,
>> >you'd have to say x1 = 'x2'; or x1= "x2";
>> I also was confused by the 'example'.
>> In addition to IF-THEN-ELSE statements, our original poster could use the
>> SELECT statement. To paraphrase your first code snippet:
>> select (count);
>> when (1) do;
>> a=1; b=2; c=3;
>> when (2) do;
>> a=4; b=5; c=6;
>> when (3) do;
>> a=7; b=8; c=9;
>> otherwise put 'PROBLEM VALUE FOR COUNT';
>> David L. Cassell
>> mathematical statistician
>> Design Pathways
>> 3115 NW Norwood Pl.
>> Corvallis OR 97330
>> Express yourself instantly with MSN Messenger! Download today - it's FREE!
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register
Netscape. Just the Net You Need.
New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp