source:
Generics/NativeGenerics/Generic/GenericPoint.pas
Last change on this file was 496, checked in by , 7 years ago | |
---|---|
File size: 281 bytes |
Line | |
---|---|
1 | unit GenericPoint; |
2 | |
3 | {$mode delphi} |
4 | |
5 | interface |
6 | |
7 | type |
8 | TGPoint<T> = record |
9 | X: T; |
10 | Y: T; |
11 | procedure Add(Point: TGPoint<T>); |
12 | end; |
13 | |
14 | |
15 | implementation |
16 | |
17 | procedure TGPoint<T>.Add(Point: TGPoint<T>); |
18 | begin |
19 | X := X + Point.X; |
20 | Y := Y + Point.Y; |
21 | end; |
22 | |
23 | end. |
Note:
See TracBrowser
for help on using the repository browser.