Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[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 <[email protected]>
To   [email protected]
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index