Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: unconventional use of if condition


From   tashi lama <[email protected]>
To   <[email protected]>
Subject   RE: st: unconventional use of if condition
Date   Fri, 29 Jun 2012 15:21:02 +0000

Got it. Thanx. 

----------------------------------------
> Date: Fri, 29 Jun 2012 11:15:41 -0400
> Subject: Re: st: unconventional use of if condition
> From: [email protected]
> To: [email protected]
>
> tashi lama <[email protected]>:
> At the very top of the help is:
> if exp { or if exp single_command
> Please read the help files more carefully.
> http://www.stata.com/help.cgi?ifcmd
>
> On Fri, Jun 29, 2012 at 11:09 AM, tashi lama <[email protected]> wrote:
> >
> > Hello,
> >
> > In the fetchyahooquotes.ado written by Mehmet F. Diche, Ph.D. and John Levendis, Ph.D., I encountered following use of if
> >
> > if ("`start'"!="") drop if date<(date("`start'", "DMY"))
> > if ("`end'"!="") drop if date>(date("`end'", "DMY"))
> >
> >
> >
> > I was under the impression and the documentation rightly says to precede 'if' with braces ("{") followed by command in the next line. Sth like this
> >
> >
> >
> > if x==4 {
> >
> > .....
> >
> > }
> >
> >
> >
> > Could someone explain me this?
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/ 		 	   		  
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index