[fpc-pascal] Delphi mode syntax error

Roland Turcan konf at rotursoft.sk
Tue Jan 19 14:39:15 CET 2010

<<< 19.01.2010 13:10 - Jonas Maebe "jonas.maebe at elis.ugent.be" >>>

JM> On 19 Jan 2010, at 12:57, Michael Van Canneyt wrote:

>> It should not compile in Delphi mode.
>> Array syntax is not supported by Delphi.

JM> Oops, only now I see he was trying to index a pointer like an array.  
JM> And even in FPC I would very strongly recommend against typecasting a
JM> dynamic array to a pointer and then performing operations using this  
JM> pointer. Dynamic arrays are opaque structures and trying to directly  
JM> access the underlying data should never be done.

Hello Jonas,

But this ways is already used in LCL/FPC source as well.

Best regards, TRoland

More information about the fpc-pascal mailing list