Introduction to OOP Chapter 4: Classes and Methods: next previous audio real text

Properties

Properties are a way to define getters and setters, but allow them to be used as if they were simple assignments and expressions:

writeln ('rank is ', aCard.rank); (* rank is property of card *)
aCard.rank = 5; (* changing the rank property *)

Intro OOP, Chapter 4, Slide 29