[SOLVED] Syntax error error in record declaration lazarus / 21-General ---------------------------------------------------------------------- Codrut1001 · 2023-11-22 14:04 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 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i 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? ---------------------------------------------------------------------- Paolo · 2023-11-22 14:13 To me it seems you missed {$modeSwitch advancedRecords} ---------------------------------------------------------------------- dseligo · 2023-11-22 14:14 Quote from: Paolo on November 22, 2023, 03:13:18 pmTo me it seems you missed {$modeSwitch advancedRecords} Or {$mode Delphi} ---------------------------------------------------------------------- Codrut1001 · 2023-11-22 14:16 Quote from: dseligo on November 22, 2023, 03:14:18 pmQuote from: Paolo on November 22, 2023, 03:13:18 pmTo me it seems you missed {$modeSwitch advancedRecords} Or {$mode Delphi} That seems to be It. Out of curiosity, why do I need to say the mode is Delphi, when I am programming in Lazarus Delphi? Thanks! ---------------------------------------------------------------------- Paolo · 2023-11-22 14:39 You are are programming in free pascal. Mode delphi means that some constructs are as per delphi.