Date: Sun, 18 Jul 2010 23:46:57 +0000
Reply-To: toby dunn <tobydunn@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: toby dunn <tobydunn@HOTMAIL.COM>
Subject: Re: Bona fide DO-loop bug (was: Re: Combining iterative DO and
UNTIL condition)
In-Reply-To: <E0B423A8C0D1E74B8905B2C5CB38C1AF08125B@GENO3.wharton.upenn.edu>
Content-Type: text/plain; charset="iso-8859-1"
Already have something in mind Mark.
Toby Dunn
"Don't bail. The best gold is at the bottom of barrels of crap."
Randy Pausch
"Be prepared. Luck is where preparation meets opportunity."
Randy Pausch
> From: mkeintz@wharton.upenn.edu
> To: tobydunn@HOTMAIL.COM; SAS-L@LISTSERV.UGA.EDU
> Subject: RE: Bona fide DO-loop bug (was: Re: Combining iterative DO and UNTIL condition)
> Date: Sun, 18 Jul 2010 23:40:50 +0000
>
> Toby:
>
> This would be a good topic for you or someone else so inclined to add to the sas tip of the day in sascommunity.org.
>
> I am not so inclined, but I suggest the title "Don'ts for DO WHILE and DO UNTIL", or a more punchy "Don'ts for DO's"
>
> Regards,
> Mark
>
> > -----Original Message-----
> > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
> > toby dunn
> > Sent: Sunday, July 18, 2010 6:54 PM
> > To: SAS-L@LISTSERV.UGA.EDU
> > Subject: Re: Bona fide DO-loop bug (was: Re: Combining iterative DO and
> > UNTIL condition)
> >
> > Paul,
> >
> >
> >
> > A little digging and I cam across this in the docs:
> >
> >
> >
> > A WHILE or UNTIL specification affects only the last item in the clause
> > in which it is located.
> >
> >
> >
> > So Do I = 1 , 2 , 3 Until( I = 2 ) , would mean it is only checked for
> > the 3 and not the 1 or 2. Which means using the a hybrid Do iterative
> > list and and a While|Until is pretty much worthless hunk of shit code.
> > Which after a little testing seems to hold true.
> >
> > Toby Dunn
> >
> > "Don't bail. The best gold is at the bottom of barrels of crap."
> > Randy Pausch
> >
> > "Be prepared. Luck is where preparation meets opportunity."
> > Randy Pausch
> >
> >
> >
> >
> > > Date: Sun, 18 Jul 2010 17:03:27 -0500
> > > From: KevinMyers@AUSTIN.RR.COM
> > > Subject: Re: Bona fide DO-loop bug (was: Re: Combining iterative DO
> > and UNTIL condition)
> > > To: SAS-L@LISTSERV.UGA.EDU
> > >
> > > Toby, I think you may be missing the point on this one. It is
> > performing as
> > > designed/intended. The While/Until clause only applies to the
> > individual
> > > comma delimited portion of the DO loop indexes of which it is a part.
> > Each
> > > comma delimited portion of the DO loop index is treated in essence as
> > if it
> > > is controlling completely separate set of iterations for the DO loop.
> > You
> > > iterate over and exit from the first command delimited index clause
> > before
> > > moving on to the next comma delimited portion.
> > >
> > > s/KAM
> > >
> > >
> > > ----- Original Message -----
> > > From: "toby dunn" <tobydunn@HOTMAIL.COM>
> > > To: <SAS-L@LISTSERV.UGA.EDU>
> > > Sent: Sunday, July 18, 2010 16:54
> > > Subject: Re: Bona fide DO-loop bug (was: Re: Combining iterative DO
> > and
> > > UNTIL condition)
> > >
> > >
> > > Good point Data _Null_, I hadnt thought to add a value greater than 2
> > as the
> > > first element. Seems the bug still holds true
> > >
> > > Toby Dunn
> > >
> > > "Don't bail. The best gold is at the bottom of barrels of crap."
> > > Randy Pausch
> > >
> > > "Be prepared. Luck is where preparation meets opportunity."
> > > Randy Pausch
> > >
> > >
> > >
> > >
> > > > Date: Sun, 18 Jul 2010 16:26:31 -0500
> > > > Subject: Re: Bona fide DO-loop bug (was: Re: Combining iterative DO
> > and
> > > > UNTIL condition)
> > > > From: iebupdte@gmail.com
> > > > To: tobydunn@hotmail.com
> > > > CC: SAS-L@listserv.uga.edu
> > > >
> > > > On 7/18/10, toby dunn <tobydunn@hotmail.com> wrote:
> > > > > Especially in light of the fact that this does work as expected:
> > > > > data _null_ ;
> > > > > do x = 1, 2, 3 While (x < 3) ;
> > > > > put x= ;
> > > > > end ;
> > > > > Run ;
> > > >
> > > > I believe your example is flawed.
> > > >
> > > > 120 data _null_;
> > > > 121 do x = 4, 1, 2, 3 While (x < 3) ;
> > > > 122 put x=;
> > > > 123 end;
> > > > 124 run;
> > > >
> > > > x=4
> > > > x=1
> > > > x=2
> > > >
> > > > You/we need to understand what the COMMA means and what syntax
> > > > elements it "delimites".
> > >
> > > _________________________________________________________________
> > > Hotmail is redefining busy with tools for the New Busy. Get more from
> > your
> > > inbox.
> > >
> > http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL
> > :ON:WL:en-US:WM_HMP:042010_2=
> >
> > _________________________________________________________________
> > Hotmail has tools for the New Busy. Search, chat and e-mail from your
> > inbox.
> > http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL
> > :ON:WL:en-US:WM_HMP:042010_1
_________________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1 |