Difference between revisions of "TPARemoveEx"
From SCAR Divi Manual
m |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | {{OpenAPI|TPA|TPARemoveEx}} | ||
+ | |||
==Definition== | ==Definition== | ||
<source lang="scar" lines="false"> | <source lang="scar" lines="false"> | ||
− | procedure | + | procedure TPARemoveEx(var TPA: TPointArray; const Point: TPoint; const All: Boolean); |
</source> | </source> | ||
==Availability== | ==Availability== | ||
SCAR Divi 3.28 > Current | SCAR Divi 3.28 > Current | ||
+ | |||
+ | ===Aliases=== | ||
+ | *TPARemovePointEx (SCAR Divi 3.26 > 3.35) | ||
==Description== | ==Description== | ||
− | Removes the | + | Removes the first occurrence of a given [[TPoint]] '''Point''' in a [[TPointArray]] '''TPA''' if '''All''' is [[false]]. If '''All''' is [[true]], it will remove every occurrences of '''Point'''. |
==Example== | ==Example== | ||
<source lang="scar"> | <source lang="scar"> | ||
var | var | ||
− | + | TPA: TPointArray; | |
begin | begin | ||
− | + | TPA := [Point(0, 0), Point(2, 2), Point(4, 5), Point(2, 2), Point(5, 10)]; | |
− | + | TPARemoveEx(TPA, Point(2, 2), True); | |
− | WriteLn( | + | WriteLn(TPAToStr(TPA)); |
end. | end. | ||
</source> | </source> | ||
Output: | Output: | ||
− | + | (0,0);(4,5);(5,10) | |
==See Also== | ==See Also== | ||
− | *[[ | + | *[[TPARemove]] |
− | *[[ | + | *[[TPADelete]] |
− | *[[ | + | *[[TPAUnique]] |
− | *[[ | + | *[[TPAAppend]] |
+ | *[[TPAInsert]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:TPA Functions]] | [[Category:TPA Functions]] | ||
[[Category:Array Functions]] | [[Category:Array Functions]] |
Latest revision as of 12:03, 28 August 2013
Additional and more up-to-date information can be found in the OpenAPI Documentation for TPARemoveEx
Definition
procedure TPARemoveEx(var TPA: TPointArray; const Point: TPoint; const All: Boolean);
Availability
SCAR Divi 3.28 > Current
Aliases
- TPARemovePointEx (SCAR Divi 3.26 > 3.35)
Description
Removes the first occurrence of a given TPoint Point in a TPointArray TPA if All is false. If All is true, it will remove every occurrences of Point.
Example
var TPA: TPointArray; begin TPA := [Point(0, 0), Point(2, 2), Point(4, 5), Point(2, 2), Point(5, 10)]; TPARemoveEx(TPA, Point(2, 2), True); WriteLn(TPAToStr(TPA)); end.
Output:
(0,0);(4,5);(5,10)