Statalist The Stata Listserver

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

st: Do file glitch?

From   "Rachel S" <[email protected]>
To   statalist <[email protected]>
Subject   st: Do file glitch?
Date   Thu, 21 Sep 2006 12:09:57 -0400

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?

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index