Op Mon, 15 May 2006, schreef ???? ???????????:

>   b= record
>      ab: int64;
>      c: longword;
>      end; // 12 expected

> writeln(sizeof(b)); // 16    ???

Suppose you have an array of b. Then, with a size of 12, there would be no 
guarantee that an access to b.ab is aligned. So, the compiler pads the 
record to a multiple of the largest field.

Daniël
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to