14 lines
205 B
ObjectPascal
14 lines
205 B
ObjectPascal
|
|
type
|
||
|
|
Person = class
|
||
|
|
|
||
|
|
end;
|
||
|
|
Student = class(Person)
|
||
|
|
public
|
||
|
|
i: integer;
|
||
|
|
end;
|
||
|
|
|
||
|
|
begin
|
||
|
|
var persons := Arr(new Person, new Person);
|
||
|
|
foreach x: Student in persons do
|
||
|
|
Print(x.GetType);
|
||
|
|
end.
|