type
TPoint = class
public
X, Y: Double;
end;
TPointHelper = class helper for TPoint
//constructor added by the helper
constructor CreateUniform(Value: Double);
end;
constructor TPointHelper.CreateUniform(
Value: Double);
begin
X := Value;
Y := Value;
end;
var
P: TPoint;
begin
P := TPoint.CreateUniform(5);
//p is (5, 5)
WriteLn('x = ', P.X:0:0, ', y = ', P.Y:0:0);
end.