I am writing add-in and as one option I allow users to specify their own modified subroutine to perform as part of the add-in. The motivation is to allow users to easily incorporate their custom procedure into the add-in that performs many other functions. However, when doing this I am encountering limitations on what is allowed in Eviews. My first attempt was to include the subroutine only if add-in argument is specified, e.g.
Code: Select all
Select all
if arg="T" then
include subname.prg
endif
This does not seem to be allowed in Eviews.
The alternative approach was to specify variable path from which to include subroutine and use default path if subroutine program does not exist in the specified location; e.g.
Code: Select all
Select all
if arg="T" then
%subourtine_path = "C:\\documents"
else
%subourtine_path = "default_path"
endif
include %subourinte_path
However, it seems that inclusion command cannot use strings, but has to have hardcoded path.
Therefore, the only solution I could figure out was to include default subroutine program from the add-in folder, which the user then would have to modify, i.e. user would not be able to use subroutine program of his own choosing.
Is there any suggested way one can allow conditional inclusion of subroutines or variable path of subroutine files?
Thanks!
CrisisStudent