Mobjfpc and Mdelphi incompatibility lazarus / 62-General ---------------------------------------------------------------------- airpas · 2014-05-13 17:29 hi this code compile without error in delphi mode , but raise an error of incompatible type in objfpc mode . how to get this code work in objfpc mode ? Code: [Select]type     PLongArray = ^TLongArray;     TlongArray = array[0..1] of longword; var    map : ^byte; begin    GetMem(map,256*256);    PlongArray(map)[1] := $ffff; // -Mobjfpc : Error : Incompatible types : got "word" expected "TlongArray"    FreeMem(map); end.  thanks ---------------------------------------------------------------------- taazz · 2014-05-13 17:35 Code: [Select]PlongArray(map)^[1] := $ffff; ---------------------------------------------------------------------- airpas · 2014-05-13 20:43 thanks taazz ---------------------------------------------------------------------- Leledumbo · 2014-05-17 04:58 http://www.freepascal.org/docs-html/prog/progsu106.html AUTODEREF is active for Delphi and TP mode, for compatibility reason.