Finalization: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: Finalization
| Old | New | Line | |
|---|---|---|---|
| 1 | + | `Finalization` is a [[Reserved words|reserved word]] within [[Object Pascal]]. It starts the optional finalization part of a [[Unit|unit]]. | |
| 2 | + | ||
| 3 | + | ## Structure of a unit | |
| 4 | + | ||
| 5 | + | ``` pascal | |
| 6 | + | unit ...; // Name of the unit | |
| 7 | + | ||
| 8 | + | interface // Everything declared here may be used by this and other units (public) | |
| 9 | + | ||
| 10 | + | uses ...; | |
| 11 | + | ||
| 12 | + | ... | |
| 13 | + | ||
| 14 | + | implementation // The implementation of the requirements for this unit only (private) | |
| 15 | + | ||
| 16 | + | uses ...; | |
| 17 | + | ||
| 18 | + | ... | |
| 19 | + | ||
| 20 | + | initialization // Optional section: variables, data etc initialised here | |
| 21 | + | ||
| 22 | + | ... | |
| 23 | + | ||
| 24 | + | finalization // Optional section: code executed when the program ends | |
| 25 | + | ||
| 26 | + | ... | |
| 27 | + | end. | |
| 28 | + | ``` | |
| 29 | + | ||
| 30 | + | ## See also | |
| 31 | + | ||
| 32 | + | - [[Finalization]] | |
| 33 | + | - [[Implementation]] | |
| 34 | + | - [[Initialization]] | |
| 35 | + | - [[Interface]] | |
| 36 | + | - [[Uses]] | |
| 37 | + | ||
| 38 | + | --- | |
| 39 | + | *From the Free Pascal wiki, page "Finalization", as it stood on 2022-08-06 after a change by Kai Burghardt, 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).* |
