mods with variables in command?
Posted: Tue Feb 21, 2023 8:51 am
I have a question about mods, which I find a highly useful feature. Is it possible to create a mod such that I can add an object name to the mod command and make the mod apply itself to that object?
In other words, let's say I have a very simple program saved as a mod and titled "LINEMOD". For example, the code may be:
string gdpstring="gdp"
for %x {GDPstring}
{%x}.line
next
When I type the command, LINEMOD, I will get a line plot of series GDP in the workfile sample. Is there a way for me to write a more generalized mod such that I could type something like LINEMOD.GDP or LINEMOD.CR or LINEMOD.SALES to get a line graph of the dotted variable? If so, can you point me to some explanation on how to carry this out? If not, it would be an awesome feature.
In other words, let's say I have a very simple program saved as a mod and titled "LINEMOD". For example, the code may be:
string gdpstring="gdp"
for %x {GDPstring}
{%x}.line
next
When I type the command, LINEMOD, I will get a line plot of series GDP in the workfile sample. Is there a way for me to write a more generalized mod such that I could type something like LINEMOD.GDP or LINEMOD.CR or LINEMOD.SALES to get a line graph of the dotted variable? If so, can you point me to some explanation on how to carry this out? If not, it would be an awesome feature.