Statalist The Stata Listserver


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

st: RE: Forvalues Problem


From   "Marino, Jennifer" <[email protected]>
To   <[email protected]>
Subject   st: RE: Forvalues Problem
Date   Fri, 24 Feb 2006 13:52:20 -0800

I think you need
forvalues i = 3 7 8{
 arg
}

but you will also want to test your argument syntax separately to be
sure there's nothing gone astray there.

Jen Marino

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Raphael
Fraser
Sent: Friday, February 24, 2006 1:41 PM
To: [email protected]
Subject: st: Forvalues Problem


I am trying to perform a loop for the values 3, 7 and 8. I keep getting
the invalid syntax error message. Can anyone offer a solution?

forvalues i = 3 7/ 8 {
	gen byte d`i' = strmatch(diag,"*D`i'*")
}

Raphael

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index