type
TBrush = record
Value: Integer;
end;
TColorPoint = record
private
FColor: TBrush;
public
//fields
X, Y: Integer;
//records support properties too
property Color: TBrush
read FColor write FColor;
end;
var
Point: TColorPoint;
Brush: TBrush;
begin
Point.X := 1;
Point.Y := 5;
Brush.Value := 255;
Point.Color := Brush;
WriteLn('point is (', Point.X, ', ',
Point.Y, '), color ', Point.Color.Value);
end.