Object/de
Zurück zu den Datentypen.
Zurück zu den reservierten Wörtern.
Besonderheiten des Datentyps object:
- Der Datentyp object gehört zur objektorientierten Programmierung.
- Der Datentyp object ist ein Vorläufer des Datentyps class.
- Der Datentyp object ist dem Datentyp class ähnlich.
- Unterschied: Der Datentyp object wird auf dem Stack gespeichert, der Datentyp class wird auf dem Heap gespeichert.
- Eine Klasse vom Datentyp object wird im Abschnitt interface der Unit bekannt gemacht (deklariert).
Beispiel für die Verwendung des Datentyps object als Basisklasse:
type
TTest = object
private
{ private declarations }
public
{ public declarations }
end;Beispiel für die Verwendung des Datentyps object als gepackte Basisklasse:
type
TTest = packed object
private
{ private declarations }
public
{ public declarations }
end;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.