Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: problem referencing certain characters


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: RE: problem referencing certain characters
Date   Fri, 22 Nov 2002 15:23:30 -0000

Kyle.Lewis@ny.frb.org

> The quote characters work fine for me too in that same 
> context, but for
> some reason, within my dofile the exact same code produces 
> the r(612)
> error, "unexpected end of file."
>      replace `var' = subinstr(`var',`"""',"",.);
> That peice of code is in a series of replace commands 
> within a for loop.
> when i comment out that single line it works 
> fine...otherwise i get that
> error.

This reminds me of problems reported by Radu 
Ban on 14 November and indeed by many others
on many other occasions. I don't know 
whether using -for- is part or all of this 
problem, but it could well be. 

My strong advice is: don't use -for- for 
tasks of this complexity. Use -foreach- 
and/or -forvalues-. 

Nick 
n.j.cox@durham.ac.uk 
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index