I have a do file with the following nested loop structure
forvalues num=1/3 {
foreach suf in AA BB CC {
gen phonepref`num'`suf' = phone`suf' * pref`num'`suf'
}
}
When I run the do file, it gives me an "unexpected end" error and, in
printing out the for loop, doesn't see the last curly bracket. On the
other hand, it works fine when I paste it into the command box.
Does anyone know where the problem is?
Thanks,
Rachel
*
* 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/