[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: SV: RE: RE: locals have short memory
From
Jeph Herrin <[email protected]>
To
[email protected]
Subject
Re: st: SV: RE: RE: locals have short memory
Date
Fri, 22 Jan 2010 11:38:19 -0500
Tomas,
If you copy/paste those rows into the command window and
hit <enter>, the code will execute and the locals will persist
until you close down Stata.
hth,
Jeph
Tomas Lind wrote:
Hi all,
The syntax below works fine if I highlite all rows and click on run". Is
this what is called "a Stata session"? However, immediately after that,
Stata forgets the content of the local macros. Is it possible to make the
the local macros functioning until I close down Stata.
/Tomas
local mynames "Stockholm Uppsala Södermanland Kronoberg"
token `mynames'
local mycount: word count `mynames'
forv i=1/`mycount' {
local lannr = `i' + 21
di " "
di " "
di in r "``i''"
}
*
* 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/
*
* 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/
*
* 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–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |