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

st: RE: RE: RE: looping through vectors (correction and apology)


From   "Patrick Sturgis" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: RE: looping through vectors (correction and apology)
Date   Wed, 28 May 2003 13:19:20 +0100

No need to apologise, I should have stated I was using Stata 7 (upgrade to 8
on the way). All working fine now - many thanks,

Patrick

-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Nick Cox
Sent: 28 May 2003 13:06
To: statalist
Subject: st: RE: RE: looping through vectors (correction and apology)


I wrote

>. foreach v of var rpy* {
>2.         local new : subinstr local   v       "rpy"   "_rpy"
>3.         replace `new' = `v'
>4. } if show3 == 1

>I don't believe you typed that and got success as the
>trailing

>if show3 == 1

>is illegal.

!!! Correction (and apology!): I guess that you are using Stata 7,
and that you are seeing a bug or a limitation of Stata 7.

Stata 7 in effect ignores the code "if show3 == 1" after
the brace. Whether that's a bug or not, it belongs to history.
Stata won't fix it now. Stata 7 is frozen at its last update.

Nick
[email protected]
*
*   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/

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index