i have a small program cu7 with a saved local macro:
program cu7, rclass
local numd 1
return local numd =`numd'
end
but using the program in an ado:
cu7
if r(numd) == 1 {
display r(numd)
}
i get:
. cu7
. if r(numd) == 1 {
type mismatch
yet this works:
local numd 1
if `numd' == 1 {
display `numd'
}
. local numd 1
. if `numd' == 1 {
. display `numd'
1
. }
and Stata is interpreting numd as 1:
. cu7
. display r(numd)
1
. return list
macros:
r(numd) : "1"
where am i going wrong?
thanks,
paul
*
* 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/