Re: [fpc-pascal] Place of elements in record

2013-02-28 Thread Koenraad Lelong
On 28-02-13 09:41, Mark Morgan Lloyd wrote: I'd suggest that this depends in part on the semiconductor technology. You might be best transferring individual fields for old-fashioned EEPROMs, or defining a larger block with a magic number for more "RAM-like" devices particularly if they have load

Re: [fpc-pascal] Place of elements in record

2013-02-28 Thread Mark Morgan Lloyd
Koenraad Lelong wrote: Hi, I'm developping a arm-embedded project. I need to store some variables to EEPROM. What I'm doing now is manually give each variable an address and then I use that address to store the variable in EEPROM. Unfortunately, that's not easy. Yesterday I spent some hours t

Re: [fpc-pascal] Place of elements in record

2013-02-28 Thread Ludo Brands
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 _

[fpc-pascal] Place of elements in record

2013-02-28 Thread Koenraad Lelong
Hi, I'm developping a arm-embedded project. I need to store some variables to EEPROM. What I'm doing now is manually give each variable an address and then I use that address to store the variable in EEPROM. Unfortunately, that's not easy. Yesterday I spent some hours trying to see why the co