Default

Default.member
marks a member in a class that may be used without being specified as in object[args] (inactive in a constructor)
  • The builtin behavior of Default is not affected.
This loads the package.
In[1]:=
Click for copyable input
We define a class dyn with a normal method f and one called g that is declared to be the default. The class stat uses Static members to avoid the necessity of object generation.
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
The object as well as the class use the default method, if the method is omitted.
In[4]:=
Click for copyable input
Out[4]=
Out[4]=
In[5]:=
Click for copyable input
Out[5]=
Out[5]=
Typically, the main property of a class is declared to be the default.