When defining packages, can I put parameter values alone or along with functions into a package in subscripted form?
BeginPackage["Myfunction`"]; Subscript[q, 1] = 0; Subscript[q, 2] = 0.5; myfunction::usage ="..."; Begin["`Private`"]; myfunction[ak__List] := blablabla...; End; EndPackage;
Because these global subscripted parameters in the package are needed in many programs, I separated them from the main programs and put them into a single package. In the main programs, I only need to load the package rather than bothering to redefine these parameters again. For plain symbols, it works fine. But whem it comes to subscripted symbols, it fails. And I found that is because I used
in the main program. subscripted symbols like
are transformed into
I also tried to use Symbolize function in the package, but it fails. The clarity for using subscripted symbols made me reluctant to avoid them.