Sign in Join
Wiki copytemporary

Constructor: what changed

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

OldNewLine
1-The [[Reserved word|reserved word]] `constructor` belongs to [[object-oriented programming]]. `Constructor` is a [[Class|class]] builder [[Method|method]] that creates the object of that class.
2-
3-Example:
1+The [[Reserved word|reserved word]] `constructor` belongs to [[object-oriented programming]]. `Constructor` is a [[Class|class]] builder [[Method|method]] that creates the object of that class.
42
5-``` pascal
3+Example:
4+```
65// class definition
7-type
8- TKlasse = class
9- end;
10-
11-var
12- // declare variable of type of class
13- clsKlasse: TKlasse;
14-
15-begin
16- ...
17- // create class
18- clsKlasse := TKlasse.Create;
19- ...
20-end;
6+ type
7+ TKlasse = class
8+ end;
9+
10+ var
11+ // declare variable of type of class
12+ clsKlasse: TKlasse;
13+
14+ begin
15+ ...
16+ // create class
17+ clsKlasse := TKlasse.Create;
18+ ...
19+ end;
2120```
2221
2322## See also
2423
25-- [[Destructor]]
24+ * [[Destructor]]
2625
2726---
28-*From the Free Pascal wiki, page "Constructor", 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).*
27+*From the Free Pascal wiki, page "Constructor", as the Internet Archive kept it on 2024-02-05. 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