Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function TPAToStr(TPA: TPointArray): string;
- var
- h, i: Integer;
- begin
- Result := '[';
- h := High(TPA);
- if (h > -1) then
- begin
- for i := 0 to (h - 1) do
- Result := (Result + '(' + IntToStr(TPA[i].X) + ', ' + IntToStr(TPA[i].Y) + '), ');
- Result := (Result + '(' + IntToStr(TPA[i].X) + ', ' + IntToStr(TPA[i].Y) + ')');
- end;
- Result := (Result + ']');
- end;
- var
- TPA: TPointArray;
- begin
- TPA := [Point(0, 1), Point(2, 3), Point(4, 5), Point(6, 7), Point(8, 9)];
- WriteLn(TPAToStr(TPA));
- end.
Advertisement
Add Comment
Please, Sign In to add comment