Object/de: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: Object/de
| Old | New | Line | |
|---|---|---|---|
| 1 | + | Zurück zu den [[Data type/de|Datentypen]]. | |
| 2 | + | ||
| 3 | + | Zurück zu den [[Reserved words/de|reservierten Wörtern]]. | |
| 4 | + | ||
| 5 | + | Besonderheiten des Datentyps object: | |
| 6 | + | ||
| 7 | + | - Der Datentyp **object** gehört zur objektorientierten Programmierung. | |
| 8 | + | ||
| 9 | + | - Der Datentyp **object** ist ein Vorläufer des Datentyps class. | |
| 10 | + | ||
| 11 | + | - Der Datentyp **object** ist dem Datentyp class ähnlich. | |
| 12 | + | ||
| 13 | + | - - Unterschied: Der Datentyp **object** wird auf dem Stack gespeichert, der Datentyp **class** wird auf dem Heap gespeichert. | |
| 14 | + | - Eine Klasse vom Datentyp **object** wird im Abschnitt interface der Unit bekannt gemacht (deklariert). | |
| 15 | + | ||
| 16 | + | Beispiel für die Verwendung des Datentyps object als Basisklasse: | |
| 17 | + | ||
| 18 | + | ``` pascal | |
| 19 | + | type | |
| 20 | + | TTest = object | |
| 21 | + | private | |
| 22 | + | { private declarations } | |
| 23 | + | public | |
| 24 | + | { public declarations } | |
| 25 | + | end; | |
| 26 | + | ``` | |
| 27 | + | ||
| 28 | + | Beispiel für die Verwendung des Datentyps object als gepackte Basisklasse: | |
| 29 | + | ||
| 30 | + | ``` pascal | |
| 31 | + | type | |
| 32 | + | TTest = packed object | |
| 33 | + | private | |
| 34 | + | { private declarations } | |
| 35 | + | public | |
| 36 | + | { public declarations } | |
| 37 | + | end; | |
| 38 | + | ``` | |
| 39 | + | ||
| 40 | + | --- | |
| 41 | + | *From the Free Pascal wiki, page "Object/de", as it stood on 2020-02-21 after a change by Trev, 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).* |
