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.
Continued discussion of undocumented Delphi 8 Property Access Specifiers, and other ways of adding and removing delegates / events handlers, including clearing the list of all the delegates / event handlers.
This article discusses the new Delphi 8 property access specifiers.
A method pointer is now the same as a global procedure, ie, procedure of object = procedure.