Delphi 8 Language Puzzles #1
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.