Finalization

From Free Pascal wiki
Revision as of 17:16, 6 August 2022 by Kai Burghardt (talk | contribs) (resolve Category: Pages using deprecated enclose attributes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Deutsch (de) English (en) suomi (fi) русский (ru)

Finalization is a reserved word within Object Pascal. It starts the optional finalization part of a unit.

Structure of a unit

 unit ...;      // Name of the unit

 interface      // Everything declared here may be used by this and other units (public)

 uses ...;

   ...

 implementation // The implementation of the requirements for this unit only (private)

 uses ...;

   ...

 initialization // Optional section: variables, data etc initialised here

   ...

 finalization   // Optional section: code executed when the program ends

   ...
 end.

See also