Statalist The Stata Listserver


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

st: programming: exiting nested loops


From   Laura Gibbons <[email protected]>
To   [email protected]
Subject   st: programming: exiting nested loops
Date   Thu, 29 Mar 2007 16:10:10 -0700 (PDT)

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?

Many thanks,

Laura

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Laura E. Gibbons, PhD
General Internal Medicine, University of Washington
Box 359780
Harborview Medical Center
325 Ninth Avenue, Seattle, WA 98104

phone: 206-744-1842 fax: 206-744-9917
Office address: 401 Broadway, Suite 5122
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*
* 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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index