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: local variable defined outside a do file


From   Mayank Mishra <mayankm16@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: local variable defined outside a do file
Date   Mon, 4 Jul 2011 18:43:19 +0530

Hi all,

This is regarding a problem related to a local variable defined
outside a do file. Following is the code:

foreach x in a b c d {
do dummy.do
save, replace
}

The dummy file uses the local variable x in its calculations and as
you can see it is defined outside the do file. The Stata gives an
error on this.
So, please tell me what can be done in this case.

Thanks and regards,

OM
*
*   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–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index