IFDEF Structure
Take special note of the IFDEF structure. The form is:
{$IFDEF Win32}
Win32 Code
{$ENDIF}
{$IFDEF CLR}
.NET Code
{$ENDIF}
While this may not appear special, consider the more common form:
{$IFDEF Win32}
Win32 Code
{$ELSE}
.NET Code
{$ENDIF}
The first form is preferred and superior to the second more common form. The first form is more easily expanded and does not imply default behaviour for new platforms. The first one is easily expanded for a third condition, while the second one is not. When expanded for three conditions the first form simply becomes:
{$IFDEF Win32}
Win32 Code
{$ENDIF}
{$IFDEF CLR}
.NET Code
{$ENDIF}
{$IFDEF Linux}
Linux Code
{$ENDIF}
Because it did not define an implicit "else" behaviour, it can be easily expanded for three, four, or as many conditions as needed.
Więcej na:
http://bdn1.borland.com/borcon2004/article/paper/0,1963,32158,00.html :)