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" <>
To   <>
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:

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