I need to make my base class local variable static, so that when extending the class, the subclass will share these variable and use their current values as set by the base class. If I do not make them static, then the base class when extended, will get fresh instance of these variable, losing their original values, which is not what I want.
To do this, one must make the base class variables static
This works, but now I do not know the syntax where to put the type on the variable.
I can't write local m::integer::static; nor local m::static::integer;
I could only write local m::static; but this means I lost the ability to have a type on the variable and lost some of the type checking which is nice to have in Maple. From Maple help:
Here is example
local n::static; #I want this type to ::integer also. But do not know how
_self:-n := n;
print("in sub class. _self:-n = ",_self:-n);
"in sub class. _self:-n = ", 10
The above is all working OK. I just would like to make n in the base class of type ::integer as well as ::static
Is there a syntax for doing this?