tw34239.pp 391 B

12345678910111213141516171819202122232425
  1. program tw34239;
  2. uses
  3. objects;
  4. type
  5. PTObj=^TObj;
  6. TObj=object(TObject)
  7. end;
  8. TObj2=object(TObj)
  9. end;
  10. TSuperObj=object(TObj)
  11. end;
  12. var
  13. t2:TObj2;
  14. begin
  15. t2.init;
  16. if not t2.Is_Object(TypeOf(TObj)) then
  17. Halt(1);
  18. if t2.Is_Object(TypeOf(TSuperObj)) then
  19. Halt(2);
  20. //writeln(t2.Is_Object(TypeOf(TObj)));
  21. //writeln(t2.Is_Object(TypeOf(TSuperObj)));
  22. //readln;
  23. end.