[fpc-pascal] Place of elements in record

Ludo Brands ludo.brands at free.fr
Thu Feb 28 09:23:14 CET 2013


On 02/28/2013 08:59 AM, Koenraad Lelong wrote:
> Other solutions ?
> 
type
  EEPROM_Content= record
   Var1 : byte;
   Var2 : word;
   Var3 : byte;
  end;

...

@EEPROM_Content(nil^).Var2 gives you the relative address of Var2 in the
record. Calculated at compile time.

Ludo





More information about the fpc-pascal mailing list