unit card; interface type suits = (Heart, Club, Diamond, Spade); colors = (Red, Black); TCard = class (TObject) public (* creation *) constructor Create (c : integer; s : suits); (* manipulation *) function color : colors; procedure draw (win : TWindow; x, y: integer); function faceUp : boolean; procedure flip; function rank : integer; function suit : suits; private suitValue : suits; rankValue : integer; faceUp : boolean; end; implementation ... end.
Borland's Delphi Pascal language is slightly different.