blob: 1c41c2c6c5731084ed502d74f38efc01102c5faf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
{ %norun }
{ %fail }
unit tw14849;
{$mode objfpc}
interface
uses
Classes, SysUtils;
type
TMarkerState=(leftActive,rightActive);
TWorldPoint=record
fX,fY:double;
end;
TCoolClass = class(TComponent)
private
fMarkerPos:array[TMarkerState] of TWorldPoint;
{ private declarations }
public
function LeftMarker :integer;
function RightMarker:integer;
{ public declarations }
{ error: using function to index property }
property xLPM:double read fMarkerPos[leftMarker].fX write fMarkerPos[leftmarker].fX;
end;
implementation
function TCoolClass.LeftMarker :integer;
begin
Result:=0;
end;
function TCoolClass.RightMarker:integer;
begin
Result:=1;
end;
end.
|