Sign in Join
Wiki copytemporary

Constructor/es: what changed

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

OldNewLine
1-La palabra reservada **constructor** es parte de la programación orientada a objetos y se utiliza para inicializar una clase. Las clases simples que no requieren inicialización, no necesitan un constructor. Una clase auto-escrita que no tiene ningún constructor puede heredar el constructor de su clase principal (si tiene un constructor).
1+La palabra reservada constructor es parte de la programación orientada a objetos y se utiliza para inicializar una clase. Las clases simples que no requieren inicialización, no necesitan un constructor. Una clase auto-escrita que no tiene ningún constructor puede heredar el constructor de su clase principal (si tiene un constructor).
22
3-Ejemplo:
4-```
3+Ejemplo:
4+
5+``` pascal
56// Definición de la calse
6- type
7- TClase = class
8- end;
9-
10- var
11- unaClase: TClase; // Declarar una variable del tipo TClase
12-
13- begin
14- ...
15- // Crear la clase
16- unaClase := TClase.Create; // Create invoca al constructor heredado de la clase primaria
17- ...
18- end;
7+type
8+ TClase = class
9+end;
10+
11+var
12+ unaClase: TClase; // Declarar una variable del tipo TClase
13+
14+begin
15+ ...
16+ // Crear la clase
17+ unaClase := TClase.Create; // Create invoca al constructor heredado de la clase primaria
18+ ...
19+end;
1920```
2021
2122---
22-*From the Free Pascal wiki, page "Constructor/es", as the Internet Archive kept it on 2023-03-20. 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).*
23+*From the Free Pascal wiki, page "Constructor/es", as it stood on 2020-01-29 after a change by Bart, 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).*
24+Category: Castellano
25+Category: Español
26+Category: Reserved words/es

Back to history