Hi -- I am trying to understand the purpose of the mata function -st_global()-. Because it just returns the contents in string form of what is in the named global macro, I do not understand why it is needed. In particular, if we have some macro with name -macName-, can't we just get the same result with "$macName" ? Here is an example. Comment? -- P
. // looking at retrieving the contents of a global macro in mata
. global testmac wow. what a fun narrative
. dis "$testmac"
wow. what a fun narrative
. mata
------------------------------------------------- mata (type end to exit) -----
: "$testmac"
wow. what a fun narrative
: maccontents=st_global("testmac")
: maccontents
wow. what a fun narrative
:
: end
-------------------------------------------------------------------------------
. // looking at retrieving the contents of a global macro in mata
. global testmac wow. what a fun narrative
. dis "$testmac"
wow. what a fun narrative
. mata
------------------------------------------------- mata (type end to exit) -----
: "$testmac"
wow. what a fun narrative
: maccontents=st_global("testmac")
: maccontents
wow. what a fun narrative
:
: end
-------------------------------------------------------------------------------
Comment