Call an object method: Difference between revisions
Content added Content deleted
(Added Algol 68) |
(→{{header|ALGOL 68}}: more notes) |
||
Line 98: | Line 98: | ||
<br> |
<br> |
||
Class methods could be members of the structure (as here) without a "this" parameter, or could be procedures defined outside the structure. |
Class methods could be members of the structure (as here) without a "this" parameter, or could be procedures defined outside the structure. |
||
<br> |
|||
In this example, the instance and class methods return VOID, but this is not necessary, any return type could be used. |
|||
<syntaxhighlight lang="algol68"> |
<syntaxhighlight lang="algol68"> |
||
BEGIN # demonstrate a possible method of simulating class & instance methods # |
BEGIN # demonstrate a possible method of simulating class & instance methods # |