Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: too many macros


From   "ali hashemi" <[email protected]>
To   <[email protected]>
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index