Statalist


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

RE: st: RE: saving local macros


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: saving local macros
Date   Wed, 7 Jan 2009 17:25:30 -0000

Put it another way: I don't think I've ever seen this request before.
That doesn't make it invalid, clearly. 

But what I think it does indicate is that portability depends on all the
local macros you use being defined within one or more programs. It
doesn't matter if you do that again and again within different programs,
as the definitions are indeed local. That's why this isn't a perceived
problem; programmers get used to defining all local macros they need
within a program or do file. That means you can walk away from a dataset
and next time re-run programs as desired. 

I also do define macros interactively, but any so defined are always
transient. 

Nick 
[email protected] 

Ashim Kapoor

yes I could do that ,but I felt people would be cleverer than I was
and would be doing it in a quick slick fashion while i walked on
slooooooooowly putting each local in 1 obs of a string variable while
people were doing SAVE MACROS! and then RECOVER MACROS!

I just wanted to know if someone did it better than I did. The notes
way is clever I think.

On Wed, Jan 7, 2009 at 10:38 PM, Philipp Rehm <[email protected]>
wrote:
> True.
> How about forcing it into a (string) variable? Even more tedious, but
> perhaps a way to do it.
>
> Ph
>
> Nick Cox wrote:
>>
>> A matrix could not be used for macros with string content. (Strictly,
>> all macros are strings, but clearly some have numeric content.)
>> Nick [email protected]
>> Philipp Rehm
>>
>> I think that's what do-files are for.
>>
>> Nevertheless: how about building up a matrix which contains the local
>> macros you encounter, which you then save into a variable? You could
then
>> recover the local macros with -levelsof-, for example.
>>
>> But I guess a do-file is the more straightforward approach...
>>
>>
>> Ashim Kapoor wrote:
>>>
>>> I somehow feel that you can save local macros in a way other than
>>> using -notes- can you ??

*
*   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