Difference between revisions of "Finalization"
From Lazarus wiki
Jump to navigationJump to search (Created page with "{{Finalization}} <syntaxhighlight lang="pascal" enclose="none">Finalization</syntaxhighlight> is a reserved word within Object Pascal. It starts the fi...") |
(Expanded content with unit structure and see also) |
||
Line 1: | Line 1: | ||
{{Finalization}} | {{Finalization}} | ||
− | <syntaxhighlight lang="pascal" enclose="none">Finalization</syntaxhighlight> is a [[Reserved words|reserved word]] within [[Object Pascal]]. It starts the finalization part of a [[Unit|unit]]. | + | <syntaxhighlight lang="pascal" enclose="none">Finalization</syntaxhighlight> is a [[Reserved words|reserved word]] within [[Object Pascal]]. It starts the optional finalization part of a [[Unit|unit]]. |
+ | |||
+ | == Structure of a unit == | ||
+ | |||
+ | <syntaxhighlight lang=pascal> | ||
+ | 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. | ||
+ | </syntaxhighlight> | ||
== See also == | == See also == | ||
− | * [[Initialization | + | |
+ | * [[Finalization]] | ||
+ | * [[Implementation]] | ||
+ | * [[Initialization]] | ||
+ | * [[Interface]] | ||
+ | * [[Uses]] |
Revision as of 05:34, 15 February 2020
│
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.