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

RE: st: macros in do files don't run


From   Dan Blanchette <[email protected]>
To   [email protected]
Subject   RE: st: macros in do files don't run
Date   Fri, 1 Jul 2005 17:16:40 -0400 (EDT)

Local macro variables are just that.  It sounds like you are
defining the macros in your do-file, highlighting them and
doing them/running them then going back and highlighting
where you call them and doing that.  If you highlight the
definition of the local macros and the code that uses the
macros all at once and do/run it all at the same time, then
you'll be good.

Highlighting code and running it in your do-file editor is
an instance to Stata.  In that instance those local macros
are local to just that instance hence they do not exist
in later instances.

This is why making them global macro variables worked for you.


Dan Blanchette

Applications Analyst Programmer
Carolina Population Center UNC-CH
[email protected]




==========================================================



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