Real

Real.member
marks a member in a class that is not called polymorphically. It is only important from where the member is called, not what type an object has.
  • The builtin behavior of Real is not affected.
This loads the package.
In[1]:=
Click for copyable input
We define a set of classes. The member a is polymorphic at all levels due to the Virtual qualifier, while b is only virtual in base and child (Real interrupts polymorphism). Finally, c is virtual in base and child and again, separated from this, in grandchild and greatgrandchild.
In[2]:=
Click for copyable input
The access to a is always polymorphically.
In[3]:=
Click for copyable input
Out[3]=
Out[3]=
Because the polymorphism is discontinued for b, it ends in class child for all functions located below grandchild. From grandchild on, b is non-polymorphic and gg reads it always from grandchild.
In[4]:=
Click for copyable input
Out[4]=
Out[4]=
For c, the polymorphism is interrupted, but continued again in grandchild. The very last value is due to polymorphism.
In[5]:=
Click for copyable input
Out[5]=
Out[5]=