uw15591.pp 342 B

12345678910111213141516171819202122
  1. unit uw15591;
  2. {$mode objfpc}
  3. interface
  4. type
  5. generic GSmartArray<TSomeType> = class
  6. private
  7. fItems :array of TSomeType;
  8. public
  9. function Length() :Integer;
  10. end;
  11. TBooleanSmartArray = specialize GSmartArray<Boolean>;
  12. implementation
  13. function GSmartArray.Length() :Integer;
  14. begin
  15. Result := System.Length(fItems);
  16. end;
  17. end.