I am wondering how to write an add-in that has some default options pre-populated, which can then be overridden with the procs command. For example, say I have an add-in called "silly_addin" that creates a copy of a variable, then multiplies it by 100. And I want to be able to provide the option to change the scalar 100 and the string name name of the copied variable, if provided. If not, I want them to be the defaults "silly_name" and 100.
I think the add-in would look something like this:
Code: Select all
%name = "silly_name"
!multiplier = 100
%name = @getnextname(%name)
series {%name} = _this.default*!multiplier
And I am hoping to do something like this
Code: Select all
variable.silly_name "new_silly_name" 200
Which should return a new variable called "new_silly_name" which is equal to variable*200. However, if I did this
Code: Select all
variable.silly_name
I'd get a new variable called "silly_name" which is equal to variable*100 (the defualts)
I hope this example is clear enough, I obviously don't want to do this exactly, but I want to be able to run an add-in via a proc command and have the ability to change default settings.
Thanks
Adam