On 21 Feb 2011, at 16:59, Roland Turcan wrote: > type TMyObj = class > private > MyPWord:PWord; > ... > end; > > procedure TMyObj.Some; > begin > ... > Inc (Cardinal (MyPWord), 2); > ... > end; > > and compiler says %subj% > > This code works fine on 32bit compiler, but what should I change to get > this running on 64bit and get the code still compatible with 32bit > compiler as well.
Change Inc (Cardinal (MyPWord), 2); into Inc (MyPWord); (note: *without* the "2"; that is implicit because MyPWord points to data items of size 2) Jonas_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal