Polymorphism: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 2,286: | Line 2,286: | ||
Properties are groups with values inside groups. We can use variables, but properties have a private variable [name] and has a Set and a Value part. We can define properties with Value/Set, Value, Set, or both automatic (here we do that for x,y and r) |
Properties are groups with values inside groups. We can use variables, but properties have a private variable [name] and has a Set and a Value part. We can define properties with Value/Set, Value, Set, or both automatic (here we do that for x,y and r) |
||
We see polymorphism for print method (module in M2000), and for operator "=". Also |
We see polymorphism for print method (module in M2000), and for operator "=". Also Constructor in Circle read types of arguments and respond accordingly as programmed. In M2000 we can read arguments later, from stack of values, so we can check this stack. |
||
<lang M2000 Interpreter> |
<lang M2000 Interpreter> |
||
Class PointA { |
Class PointA { |