Difference between revisions of "TPAAppend"
From SCAR Divi Manual
(5 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
==Availability== | ==Availability== | ||
SCAR Divi 3.28 > Current | SCAR Divi 3.28 > Current | ||
+ | |||
+ | *Before 3.34 the function had no result. | ||
==Description== | ==Description== | ||
− | Appends the given [[TPoint]] '''Point''' to end of the given TPointArray '''TPA'''. | + | Appends the given [[TPoint]] '''Point''' to end of the given TPointArray '''TPA'''. The index of the appended element is returned. |
==Example== | ==Example== | ||
Line 17: | Line 19: | ||
begin | begin | ||
TPA := [Point(0, 0), Point(1, 1), Point(3, 3)]; | TPA := [Point(0, 0), Point(1, 1), Point(3, 3)]; | ||
− | TPAAppend(TPA, Point(4, 4)); | + | WriteLn(TPAAppend(TPA, Point(4, 4))); |
WriteLn(TPAToStr(TPA)); | WriteLn(TPAToStr(TPA)); | ||
end. | end. | ||
Line 23: | Line 25: | ||
Output: | Output: | ||
+ | 3 | ||
(0,0);(1,1);(3,3);(4,4) | (0,0);(1,1);(3,3);(4,4) | ||
==See Also== | ==See Also== | ||
+ | *[[TPAInsert]] | ||
+ | *[[TPADelete]] | ||
*[[TPARemove]] | *[[TPARemove]] | ||
− | *[[ | + | *[[TPARemoveEx]] |
− | |||
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:TPA Functions]] | [[Category:TPA Functions]] | ||
[[Category:Array Functions]] | [[Category:Array Functions]] |
Latest revision as of 16:13, 21 August 2013
Definition
procedure TPAAppend(var TPA: TPointArray; const Point: TPoint);
Availability
SCAR Divi 3.28 > Current
- Before 3.34 the function had no result.
Description
Appends the given TPoint Point to end of the given TPointArray TPA. The index of the appended element is returned.
Example
var TPA: TPointArray; begin TPA := [Point(0, 0), Point(1, 1), Point(3, 3)]; WriteLn(TPAAppend(TPA, Point(4, 4))); WriteLn(TPAToStr(TPA)); end.
Output:
3 (0,0);(1,1);(3,3);(4,4)