About the author
Consider the following program for Delphi 8. If the dot is removed from the $DEFINE compiler directive, the code compiles, otherwise, it fails.
Why?
program Delphi8LanguageOddities; {$APPTYPE CONSOLE} {.$DEFINE VAROBJ} uses SysUtils; {$IF Defined(VAROBJ)} procedure FillChar(var Obj: TObject; Size: Integer; Ch: WideChar); begin end; {$ELSE} procedure FillChar(Obj: TObject; Size: Integer; Ch: WideChar); begin end; {$IFEND} var A: DateTime; begin A := Now; FillChar(A, SizeOf(A), #0); end.
A method to design records so that they're allocated on a specific byte boundary, such as 16 bytes, 512 bytes, 4096 bytes, etc.