[fpc-pascal] alignment of records
Jonas Maebe
jonas.maebe at elis.ugent.be
Fri Aug 7 08:32:52 CEST 2015
Xiangrong Fang wrote:
> OK, as a matter of fact, the stuff was copied from output of h2pas
> conversion program. :-)
Then it seems that h2pas is pretty broken.
> However, another issue: if I use this :
>
> {$CODEALIGN RECORDMIN=4}
>
> It worked.
No, it didn't. The record definition was still wrong.
> i.e. output size same as C version.
That's coincidence.
I wonder what's the
> difference between $CODEALIGN and $A/$PACKRECORDS?
Packrecords sets the maximum field alignment. As the name implies,
{$codealign recordmin} sets the minimum field alignment.
> Also, if I use "packed records", alignment will never take place,
> regardless of $A settings, right?
Indeed.
Jonas
More information about the fpc-pascal
mailing list