Wiki-kopiopeilipalvelin

Tämä on pascal.chatin wikin peilipalvelin. Muokkaus, historia ja kirjautuminen ovat siellä.

Constructor/fi

Deutsch · English · Español · Suomi · Русский

Varattu sana constructor kuuluu olio-ohjelmointiin. Constructor on luokan (class) rakentaja metodi joka luo luokan oliot.

Esimerkki:

pascal
// Luokan määrittely
type
  TKlasse = class
  end;

var
  // Määritellään luokan olio
  clsKlasse: TKlasse;

begin
  ...
  // luodaan luokan olio
  clsKlasse := TKlasse.Create; 
  ...
end;

Katso myös


From the Free Pascal wiki, page "Constructor/fi", 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.

Versio 3, viimeksi muokannut WikiArchive .