Object's own reference.
Self
The Self keyword provides a way for a method to access the object it belongs to.
Super | Method
Language reference
An object which passes a reference to itself to an outside function. In this case, the Speak method passes Self as the first parameter of the DrawSpeechBubble function.
Class
Person
Field
x
:
Int
,
y
:
Int
Method
Speak
(
text
:
String
)
DrawSpeechBubble
(
Self
,
text
)
End
End
Function
DrawSpeechBubble
(
p
:
Person
,
say
:
String
)
DrawText
say
,
p.x
,
p.y
End