Statalist The Stata Listserver


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

st: RE: Delimiter in a loop


From   "Riano, Juanita" <JRiano@imf.org>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Delimiter in a loop
Date   Tue, 16 May 2006 15:37:46 -0400

# delimit ;
foreach v of var var1 var2 var3 {;
	do something;
	};


---------------------------------------------
Juanita Riano
International Monetary Fund
Research Department
jriano@imf.org
phone 202-623-5437

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Thomas
Speidel
Sent: Tuesday, May 16, 2006 3:34 PM
To: statalist@hsphsun2.harvard.edu
Subject: st: Delimiter in a loop

Is there a way to use the " ; " delimiter in a loop?  For example, doing
something on the line of:

# delimit ;
foreach v of var var1 var2 var3 {
	do something
	}
;
 
Would return the error that the code "follows on the same line as open
brace". 

Thanks,
Thomas

--
Thomas Speidel
Statistical Associate
Clinical Trials Unit
Tom Baker Cancer Centre
1331 - 29th Street N.W.
Calgary, AB, T2N 4N4

Tel. (403) 521-3370
Email: thomassp@cancerboard.ab.ca


This e-mail and any attachments may contain confidential and privileged
information. If you are not the intended recipient, please notify the
sender immediately by return e-mail, delete this e-mail and destroy any
copies. Any dissemination or use of this information by a person other
than the intended recipient is unauthorized and may be illegal.

*
*   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/

*
*   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