[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: posting a long list
> Hello - I'm trying to use -postfile- to post a long list of
> names stored in
> a macro (I tried both local and global). When I try to build
> this macro by
> appending each name, one at a time, it refuses to exceed 80
> characters in
> 1. Is there a way to make a macro longer than 80 characters?
My guess is that you are doing something like the following to build up
your list of variable names, inside a loop:
local longmac = "`longmac' `newpart'"
WHen you use the equals sign, Stata evaluates the stuff to the right,
then assigns it to the macro. When (non SE) Stata evaluates a string,
it truncates it at 80 characters.
However, in this case you can do the following:
local longmac "`longmac' `newpart'"
(Note there is no equal sign). In this case, Stata just puts whatever
is after the macro name in the macro, without evaluating it, and
therefore without truncating it. You have to be careful subsequently
what you do with the macro, though; if you wanted to make it all lower
case and did this
you will truncate it again.
This should deal with your problem. To further clarify the distinction,
local x1 = 1+1
local x2 1+1
display "x1 is `x1'"
display "x2 is `x2'"
* For searches and help try: