Difference between revisions of "TPAUnique"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> procedure TPARemoveDupl(var TPA: TPointArray); </source> ==Availability== SCAR Divi 3.26 > Current ==Description== This functi...") |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Definition== | ==Definition== | ||
<source lang="scar" lines="false"> | <source lang="scar" lines="false"> | ||
− | procedure | + | procedure TPAUnique(var TPA: TPointArray); |
</source> | </source> | ||
==Availability== | ==Availability== | ||
− | SCAR Divi 3.26 > | + | SCAR Divi 3.28 > Current |
+ | |||
+ | ===Aliases=== | ||
+ | *TPARemoveDupl (SCAR Divi 3.26 > 3.35) | ||
==Description== | ==Description== | ||
Line 17: | Line 20: | ||
begin | begin | ||
TPA := [Point(0, 0), Point(2, 2), Point(5, 10), Point(0, 0)]; | TPA := [Point(0, 0), Point(2, 2), Point(5, 10), Point(0, 0)]; | ||
− | + | TPAUnique(TPA); | |
− | WriteLn( | + | WriteLn(TPAToStr(TPA)); |
end. | end. | ||
</source> | </source> | ||
Output: | Output: | ||
− | + | (0,0);(2,2);(5,10) | |
==See Also== | ==See Also== | ||
+ | *[[TPADelete]] | ||
*[[TPARemove]] | *[[TPARemove]] | ||
− | *[[ | + | *[[TPARemoveEx]] |
− | |||
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:TPA Functions]] | [[Category:TPA Functions]] | ||
+ | [[Category:Array Functions]] |
Latest revision as of 11:50, 14 July 2012
Definition
procedure TPAUnique(var TPA: TPointArray);
Availability
SCAR Divi 3.28 > Current
Aliases
- TPARemoveDupl (SCAR Divi 3.26 > 3.35)
Description
This function removes all of the duplicate coordinates in a given TPointArray TPA.
Example
var TPA: TPointArray; begin TPA := [Point(0, 0), Point(2, 2), Point(5, 10), Point(0, 0)]; TPAUnique(TPA); WriteLn(TPAToStr(TPA)); end.
Output:
(0,0);(2,2);(5,10)