Delphi compiler directives: Delphi 2006 vs. 2007

Posted: (EET/GMT+2)

 

If you are using Delphi, you might be aware of the code editor keyboard shortcut Ctrl+O,O (letter O, not zero) that puts the currently set compiler directives at the top of the currently active file. This shortcut, although no corresponding menu command is available, is useful when you want to remember which were those available compiler directives, especially $WARN and so on.

Since I had both Delphi 2006 (officially Borland Developer Studio 2006) and Delphi 2007 for Win32 installed on my laptop, I decided to quickly compare these versions. I noticed that Delphi 2007 has the following directives that Delphi 2006 doesn't support:

{$WARN TYPEINFO_IMPLICITLY_ADDED ON}
{$WARN XML_WHITESPACE_NOT_ALLOWED ON}
{$WARN XML_UNKNOWN_ENTITY ON}
{$WARN XML_INVALID_NAME_START ON}
{$WARN XML_INVALID_NAME ON}
{$WARN XML_EXPECTED_CHARACTER ON}
{$WARN XML_CREF_NO_RESOLVE ON}
{$WARN XML_NO_PARM ON}
{$WARN XML_NO_MATCHING_PARM ON}

So basically, the new directives are related to XML processing.

PS. CodeGear's web site has a new look, check it out!