Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: RE: Double -for- loop on one line crashes Stata (resend)


From   "Nick Winter" <nwinter@policystudies.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: RE: Double -for- loop on one line crashes Stata (resend)
Date   Tue, 15 Oct 2002 12:37:33 -0400

> Apologies for previous premature send. 
> 
> I don't know if what appears in my mailer 
> is exactly what you typed, but my advice 
> is _never_ to place any text on a line after 
> a left brace { in a loop. Always start a new 
> line. 
> 
> Sometimes Stata can work out what you 
> mean when you do that, but it is not 
> guaranteed that it will be able to do so. 
> 
> This is perhaps tacit rather than explicit 
> in documentation. 
> 

Good advice from Nick Cox.  Still and all, presumably Stata should at
least respond with an error message, rather than exiting completely.
(Behavio(u)r I just confirmed.)

I'll note also that  -if <condition> { do something }- works and is
commonly used in both user and Stata-written code...

--Nick Winter
 
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index