2009/10/11 Graeme Geldenhuys <graemeg.li...@gmail.com>: > On 11/10/2009, Henry Vermaak <henry.verm...@gmail.com> wrote: >> > >> > Sizeof(X) is 10 bytes. >> > Sizeof(PX) is 4 bytes. >> > >> > Still you can use X[1] and PX[1]. That's illogical. >> >> >> I've tested this now and could only get this behaviour with {$mode delphi}. > > So what did the other modes return? objfpc?
It produced a compilation error: array_test.pas(17,27) Error: Can't read or write variables of this type You have to dereference the pointer to the array, i.e. pia^[x]. Henry _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal