odissey1
asked on
How initialaize TPoint array: Poly: array [0..2] of TPoint = ( (1,1), (2,2), (3,3) ); //not compile
Hi Experts,
how to initialize a TPoint Array, like:
Poly: array [0..2] of TPoint = ( (1,1), (2,2), (3,3) ); //this won't compile
Sincerely,
odissey1
how to initialize a TPoint Array, like:
Poly: array [0..2] of TPoint = ( (1,1), (2,2), (3,3) ); //this won't compile
Sincerely,
odissey1
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
something like this will do the work (workaround).
procedure TForm1.Button1Click(Sender
const
v: array [0..2, 0..1] of Integer = ((1, 2), (1, 1), (1, 1));
var
p: array [0..2] of TPoint;
i: Integer;
begin
for i := low(p) to high(p) do
p[i] := Point(v[i][0], v[i][1]);
end;