[fpc-pascal] alignment of records
Xiangrong Fang
xrfang at gmail.com
Fri Aug 7 08:06:04 CEST 2015
>
> By using the correct types for the fields:
> http://www.freepascal.org/docs-html/rtl/ctypes/index-3.html
>
> E.g., "unsigned long" is not (always) the same as "dword".
>
>
> OK, as a matter of fact, the stuff was copied from output of h2pas
conversion program. :-) I will use ctypes to test again.
However, another issue: if I use this :
{$CODEALIGN RECORDMIN=4}
It worked. i.e. output size same as C version. I wonder what's the
difference between $CODEALIGN and $A/$PACKRECORDS?
Also, if I use "packed records", alignment will never take place,
regardless of $A settings, right?
Thanks!
Xiangrong
> Jonas
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20150807/3582deab/attachment.html>
More information about the fpc-pascal
mailing list