Sign in Join
Wiki copytemporary

Implementation: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: Implementation

OldNewLine
1+**implementation** is a [[Reserved words|reserved word]] that is used to structure (subdivide) a [[Unit|unit]].
2+
3+In the implementation section everything that has been declared there can only be used in this unit. It is the *private part* in other languages.
4+
5+Example of a unit structure:
6+
7+``` pascal
8+ unit ...; // Name of the unit
9+
10+ interface // Everything declared here may be used by this and other units (public)
11+
12+ uses ...;
13+
14+ ...
15+
16+ implementation // The implementation of the requirements for this unit only (private)
17+
18+ uses ...;
19+
20+ ...
21+
22+ initialization // Optional section: variables, data etc initialised here
23+
24+ ...
25+
26+ finalization // Optional section: code executed when the program ends
27+
28+ ...
29+ end.
30+```
31+
32+---
33+*From the Free Pascal wiki, page "Implementation", as it stood on 2020-06-29 after a change by Arent, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history