Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Program error: code follows on same line as open brace


From   Daniel Almar de Sneijder <dasneijder@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Program error: code follows on same line as open brace
Date   Wed, 12 Sep 2012 17:26:09 -0400

Hello statalist,

When I attempt:

foreach wave of numlist 1/8 {
gen r`wave'Name = r`wave'Caregiving
}

I receive the error:
Program error: code follows on same line as open brace

The first wave gots created, i.e. r1Name. But as soon as it starts
with wave 2 the message appears.
Does anybody knows why this is happening? And how to fix it?

I have tried
foreach wave of numlist 1/8 { *
gen r`wave'Semin = r`wave'Caregiving
} *
*

without succes
and also

foreach wave of numlist 1/8 { *

gen r`wave'Semin = r`wave'Caregiving

} *
*

THANKS,
daniel
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index