On Thu, 14 Sep 2006, Marc Santhoff wrote:

Hi,

when using arrays in C the layout of arrays is sort of flat, since
pointer arithmetics for accessing values works (e.g. "pointer += 4" for
32 bit values).

Is this the same for pascal/fpc? Do values of for example an integer
array sit in memory at 4 Byte boundaries?

For integers: normally, yes.

For elements that are smaller than integers, this may depend on the size
and the value of the {$Align} directive. But some of the compiler specialists should confirm this.

(and then I'll add a note on this in the programmer's manual)

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to