[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: AW: locals have short memory

From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: locals have short memory
Date   Fri, 22 Jan 2010 16:32:49 +0100


Why not use -global-s then? Only catch: -tokenize- will always produce


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Tomas Lind
Gesendet: Freitag, 22. Januar 2010 16:30
An: [email protected]
Betreff: st: locals have short memory

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. 


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:

*   For searches and help try:

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