123456789101112131415161718192021222324252627282930 |
- unit ugeneric4;
- interface
- {$mode objfpc}
- type
- TList=generic(_T) class(TObject)
- data : _T;
- procedure Fill;
- end;
- var
- globaldata : string;
- implementation
- procedure LocalFill;
- begin
- globaldata:='Unit';
- end;
- procedure TList.Fill;
- begin
- LocalFill;
- data:=globaldata;
- end;
- end.
|