{$mode delphi} and dynamic array initializers, is there a modeswitch? lazarus / 62-General ---------------------------------------------------------------------- prof7bit · 2021-09-06 13:14 This works in delphi mode: 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 program Project1;{$mode delphi} type  TArr = array of Integer; const  // objfpc would not allow me to use these kind of  // initializers or any kind of dyn array initializers  // that I am aware of at all. Delphi mode does!  Foo: TArr = [1,2,3];  Bar: TArr = [1,2,3,4,5]; beginend.  Do I really need to set the unit to Delphi mode for this to work or is there also a {$modeswitch xyz} where I can just turn on this one feature? ---------------------------------------------------------------------- prof7bit · 2021-09-06 13:26 I'm now going to answer my own post: Instead of [] just use () and it works. I think I should read the release notes of new FPC versions more carefully, until 5 minutes ago I was 100% convinced it would not be possible in FPC.