On Tue, Mar 12, 2013 at 5:30 AM, Darius Blaszyk <dhkblas...@zeelandnet.nl> wrote: > function GETNEXT(x: pLList): pLList; inline; > begin > exit(pLList(pchar(x) - pchar(pLList(nil)^.next))); > end; > > And let LList be declared as: > > LList = record > len: integer; > next, prev: pLList; > name: PChar; > nextname: PChar; > flag: integer; > end;
AFAICS you're missing an "address" operator: @(pLList(nil)^.next) Otherwise you decrement by 'next' value - which I hope is zero ;-) -Flávio _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal