{$MODE FPC}
{$MODESWITCH AUTODEREF}
uses
  darray_old,
  useful;

type
  TArrayOfInteger = specialize TArray<LongInt>;
  TArrayOfEntity = specialize TArray<TEntity>;
  TArrayOfKeeper = specialize TArray<TKeeper>;

var
  P: TArrayOfEntity.TPtr;
  A: TArrayOfInteger;
  E: TArrayOfEntity;
  K: TArrayOfKeeper;
  I: LongInt;

begin
  // general test for Free procedure
  P := nil;
  P.Free;

  A.Init([6, 5, 3, 2, 7]);
  Writeln(A[A.First]^, ' ', A[A.Last]^);
  for I := 0 to A.High do
    Write(A[I]^, ' ');
  A.Done;
end.
