Macro parameters inside of nested procedure are shared?
Posted: Mon Oct 31, 2011 8:27 am
I was playing around with macro's and wondered if I could create a function on the fly, I found that a function nested within a macro shared parameters with the macro, regardless of being declared shared, static, protected or not.
Also, I think my use of the term "nested" may be wrong?
I don't think there is any use in this, I am just curious as to what is actually happening here I guess.
Also, I think my use of the term "nested" may be wrong?
Code: Select all
param = 0
Macro confuse_me(funcname, param)
Procedure funcname()
;Protected param.l
;param = 1
If param = 10
Debug "param equal to 10."
Else
Debug "param not equal to 10."
EndIf
EndProcedure
funcname()
EndMacro
confuse_me(nested, 10)