Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: programming: exiting nested loops


From   Kit Baum <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: programming: exiting nested loops
Date   Fri, 30 Mar 2007 07:22:47 -0400

help continue


Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


On Mar 30, 2007, at 2:33 AM, statalist-digest wrote:

I'm writing a simulation program where if something happens, I want to
jump out of a set of nested loops and go to the next replication. Is
there a short cut for putting -continue, break- in every nested loop?

When I learned Fortran with numbered program lines (cards, actually, this
was 36 years ago!), I could just write "GO TO 100" which meant go to line
100. Is there anything similar in Stata?
*
*   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