source: Generics/NativeGenerics/Generic/GenericPoint.pas

Last change on this file was 496, checked in by chronos, 7 years ago
  • Modified: New native generics classes working under FPC 3.0 transformed from TemplateGenerics package.
File size: 281 bytes
Line 
1unit GenericPoint;
2
3{$mode delphi}
4
5interface
6
7type
8 TGPoint<T> = record
9 X: T;
10 Y: T;
11 procedure Add(Point: TGPoint<T>);
12 end;
13
14
15implementation
16
17procedure TGPoint<T>.Add(Point: TGPoint<T>);
18begin
19 X := X + Point.X;
20 Y := Y + Point.Y;
21end;
22
23end.
Note: See TracBrowser for help on using the repository browser.