[fpc-pascal] How to find address of record member

Martin fpc at mfriebe.de
Sun Jul 8 19:54:30 CEST 2018


On 08/07/2018 19:08, Bo Berglund wrote:
> But typecasting the operation fixed the problem:
>    offs := Cardinal(@FAppData.Info) - Cardinal(@FAppData);
>
> No compiler errors here anymore.
>
May be a result of {$TYPEDADDRESS On} which may be default in some mode 
switches.

Untyped pointers seem to be subtract-able. But typed pointers of 
different type.....



More information about the fpc-pascal mailing list