I am porting some libraries from Embarcadero Delphi to Lazarus, but I get a error which I cannot understand:
Cod.Types.pas(38,9) Fatal: Syntax error, ":" expected but "identifier RECT" found
If I delete "public", I get this error:
Cod.Types.pas(47,9) Fatal: Syntax error, "END" expected but "FUNCTION" found
And If I delete public and the functions, the code compiles
TRoundRect = record
public
Rect: TRect;
RoundTL,
RoundTR,
RoundBL,
RoundBR: integer;
Corners: TCorners;
function Left: integer;
function Right: integer;
function Top: integer;
function Bottom: integer;
function TopLeft: TPoint;
function BottomRight: TPoint;
function Height: integer;
function Width: integer;
procedure Offset(const DX, DY: Integer);
procedure SetRoundness(Value: integer);
function GetRoundness: integer;
function RoundX: integer;
function RoundY: integer;
constructor Create(TopLeft, BottomRight: TPoint; Rnd: integer); overload;
constructor Create(SRect: TRect; Rnd: integer); overload;
constructor Create(Left, Top, Right, Bottom: integer; Rnd: integer); overload;
end;
I feel like I'm missing something, but everything seems correct. Anyone has an idea?