Delphi Programming


2,918pages on
this wiki
Add New Page
Add New Page Talk0
This article is a stub.
Please help enhance the Delphi Programming Wiki by expanding it.

A unit is a Delphi source file(*.pas). It contains interface, class, type and method declarations and implementations. Unlike some other languages (such as C or C++) which have a separate header file for declarations which is 'included' in the code file, Delphi's units contain all required information for both declarations and implementations in a single file.

Each unit is stored in its own file and compiled separately. Compiled units are linked to create an application. Compiled unit file has (*.dcu) extension.

Units are referenced by other units by being listed in that unit's uses clause.

A unit file begins with a unit heading, which is followed by the sections:

The unit must conclude with the word end followed by a period.

Also on Fandom

Random Wiki