Fandom

Delphi Programming

Units

2,918pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Stub
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