Marco's Web Center

Menu for Books
Delphi 2007 Handbook
Mastering Delphi 2005
Essential Delphi 8 for .NET
Mastering Delphi 7
Essential Pascal
Essential Delphi
Buy Books Online
Marco's TechBookStore

Site Menu
Object Pascal Handbook
Delphi Handbooks Collection
Mastering Borland Delphi 2005
(Old) White Papers
(Old)Tools
(Old) Conferences

My Other Sites
Italian Site (www.marcocantu.it)
the delphi search

Spirit of delphi

Advertising
Home My Blog Books Object Pascal Marco

Books : Mastering Borland Delphi 2005: Update for Delphi 2006

Mastering Delphi Update for Delphi 2006


Chapter 3

The Win32 Compiler in Delphi 2006

The Win32 compiler in Delphi 2006 has a number of interesting improvements, including some very interesting (and long awaited) ones. Moreover, some of the undocumented features in the Delphi 2005 compiler (that I described in “Mastering Borland Delphi 2005”) have been formally introduced and supported.

As this is a new version of the compiler (numbered 18.0), you might have to update your conditional compilation blocks, by using:

{$IFDEF VER180}

Another interesting feature, even if not commonly used, is that you can invoke the command line compiler with a new flag --no-config to disable the use of the default configuration file (dcc32.cfg).

Getting to the interesting new features, it is worth noticing that the aim is still to increase the degree of compatibility with the Delphi language .NET compiler. This aim is achieved by introducing class data (at last!), records with methods, and record operators overloading. As all of these features are discussed in Chapter 4 of the book, I'll delay the description of the equivalent Win32 capabilities until the “add-on” material for the next chapter.

Finally, notice the change from what I wrote in the section on “Inlining” in Chapter 3 of the book, in Delphi 2006 even compiler magic functions can now be inlined. These include the Length function, which is why the InliningTest example described in “Mastering Borland Delphi 2005” (which described how to write your own version of Length to optimize it) with the new version of Delphi becomes almost meaningless. This is in fact very good news, as Length is a very commonly used function and having it optimized certainly does help (even if you gain only a few microseconds for each call).