/
n-dimens
/
pascalabcnet
Обзор
Документация
Войти
/
n-dimens
/
pascalabcnet
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
3.0
TestSamples/CompilationSamples/PersonInternal.pas
30 строк
859 B
Бондарев Иван
initial commit
14 май 2015, 22:35
14 май 2015, 22:35
e6e67c1
Код
Авторство
О чём код?
// �������� ������� ������ ���������� ������ // ��������: ������ ����� ������������� ����� ����� ���������� // ����������: ��� ������� ������� ��������� ������ �������� type Person = class private // ���� ������, ��� �������, ��������. ������ � ��� - ����� ������ � �������� name: string; age: integer; public // ����������� ������ ����� ��� Create constructor (n: string; a: integer); begin name := n; age := a; end; procedure Print; begin writeln('���: ',name,' �������: ',age); end; end; var p,p1: Person; begin p := new Person('������',20); // ����� ��������� ������ ������������ (�������������) p.Print; p1 := Person.Create('�����',19); // ������ ��������� ������ ������������ (�� �������������) p1.Print; // ����������� �����������, ������ ��� - �������������� ������ ������ end.