Date: Tue, 23 May 2006 09:47:29 -0400
Reply-To: "data _null_;" <datanull@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "data _null_;" <datanull@GMAIL.COM>
Subject: Re: Very Simple: Do Until
In-Reply-To: <20060523134142.81856.qmail@web25603.mail.ukl.yahoo.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Because STOCK is never equal to 0?
6 data _null_;
7 do stock = 5 by -2 until(stock le 0);
8 put stock=;
9 end;
10 run;
stock=5
stock=3
stock=1
stock=-1
On 5/23/06, Franz <franz_cl2003@yahoo.fr> wrote:
> Dear all,
>
> The first program runs very well.
> But why not the second one?
>
> First Prog.
>
> data test;
> stock =2;
> nbr_ = 0;
> do until(stock=0);
> stock = stock -1;
> nbr_ = nbr_ +1;
> output;
> end;
> run;
>
>
> Second Prog.
>
> data test;
> stock =5;
> nbr_ = 0;
> do until(stock=0);
> stock = stock-2;
> nbr_ = nbr_ +1;
> output;
> end;
> run;
>
> Thanks & regards,
> Franz.
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
|