Sign in Join
Wiki copytemporary

Revision 1 of 1, by Bart on 1-29-2020. The page as it is now.

Constructor/ru

Зарезервированное слово constructor относится к объектно-ориентированному программированию. Оно является методом для создания класса, который создает объект класса.

Пример:

pascal
// определение класса
type
  TKlasse = class
  end;

var
  // объявление переменной типа класса
  clsKlasse: TKlasse;

begin
  ...
  // создание класса
  clsKlasse := TKlasse.Create; 
  ...
end;

См. также


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