I would like to put a global macro within a global macro in a Stata.
For example, $hello$oneworld
, which is the global macro $one
inside the macro $helloworld
.
How do I get a global macro within a global macro?
I would like to put a global macro within a global macro in a Stata.
For example, $hello$oneworld
, which is the global macro $one
inside the macro $helloworld
.
How do I get a global macro within a global macro?
Advanced manipulation of global macros is covered in [U] 18.3.10 which is bundled with Stata and independently accessible at www.stata.com/manuals/u18.pdf
$hello$oneworld
is just the contents of $hello
followed by the contents of $oneworld
; in either case that is evaluated as empty if the global macro is not defined.
I don't understand what you want to see, but curly braces allow some subtle effects. On the whole the nesting of macro references is easier with local macros, which in general are greatly preferable for almost all purposes.
You perhaps should give examples of precisely what you want to achieve.