Introduction to OOP Chapter 5: Messages Instances and Initialization: next previous audio real text

The Receiver Variable

Inside a method, the receiver can be accessed by means of a pseudo-variable

function PlayingCard.color : colors;
begin
	if (self.suit = Heart) or (self.suit = Diamond) then
		color := Red
	else
		color := Black;
end

Intro OOP, Chapter 5, Slide 05