New Delphi 6 Features

A number of nice additions to Delphi 6, particularly in the language and compiler area, can make application development go more smoothly. However, it's important to bear in mind that employing these features might mean that your code will not compile in earlier product versions.

Variants

Rather than being implemented within the compiler, support for the Variant data type has been opened up to support user-installable types. This support is found in the Variants unit.

Enum Values

In an effort to achieve greater compatibility with C++, the compiler now supports the assignment of values to elements of an enumerated type, as shown here:

type
  TFoo = (fTwo=2, fFour=4, fSix=6, fEight=8);
						

$IF Directive

One particular feature ...

Get Borland® Delphi™ 6 Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.