Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: too many macros


From   "ali hashemi" <hashemi@vt.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: too many macros
Date   Wed, 29 Jun 2011 22:01:58 -0400

Dear list members,

Is there any limit on the number of macros that can be defined in a program?
I am using local macros to read the regressors in the varlist. Here is the
syntax:

program prog
syntax varlist
local N: word count `varlist'
gettoken lhs rhs: varlist
forval i=1/`N' {
	local x`i' : word `i' of `rhs'
	}
...
end


The above code works fine when the number of variables in the varlist is
less than 18. However, in my case I have at least 400 variables in the
varlist and I get this error message: "too many macros"

Is there anything wrong with the above code that causes this problem? If
there is a limit for the number of macros defined in the program how can I
call the regressors in the varlist?


Your help is very much appreciated
Best,
Ali

 


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index