Difference between revisions of "TPARemoveEx"

From SCAR Divi Manual
Jump to: navigation, search
(Undo revision 1186 by Freddy (talk))
Line 1: Line 1:
 
==Definition==
 
==Definition==
 
<source lang="scar" lines="false">
 
<source lang="scar" lines="false">
procedure TIARemoveEx(var TIA: TIntArray; const Int: Integer; const All: Boolean);
+
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 > Current)
  
 
==Description==
 
==Description==
Removes the last occurrence of a given [[Integer|integer]] '''Int''' in a [[TIntArray]] '''TIA''' if '''All''' is [[false]]. If '''All''' is [[true]], it will remove every occurrences of '''Int'''.
+
Removes the last 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
   TIA: TIntArray;
+
   TPA: TPointArray;
  
 
begin
 
begin
   TIA := [1, 5, 4, 8, 7, 4, 6];
+
   TPA := [Point(0, 0), Point(2, 2), Point(4, 5), Point(2, 2), Point(5, 10)];
   TIARemoveEx(TIA, 4, True);
+
   TPARemovePointEx(TPA, Point(2, 2), True);
   WriteLn(TIAToStr(TIA));
+
   WriteLn(TPAToStr(TPA));
 
end.
 
end.
 
</source>
 
</source>
  
 
Output:
 
Output:
  1,5,8,7,6
+
  (0,0);(4,5);(5,10)
  
 
==See Also==
 
==See Also==
*[[TIARemove]]
+
*[[TPARemove]]
*[[TIADelete]]
+
*[[TPADelete]]
*[[TIAUnique]]
+
*[[TPAUnique]]
*[[TIAAppend]]
+
*[[TPAAppend]]
  
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:TPA Functions]]
 
[[Category:TPA Functions]]
 
[[Category:Array Functions]]
 
[[Category:Array Functions]]

Revision as of 20:15, 24 October 2011

Definition

procedure TPARemoveEx(var TPA: TPointArray; const Point: TPoint; const All: Boolean);

Availability

SCAR Divi 3.28 > Current

Aliases

  • TPARemovePointEx (SCAR Divi 3.26 > Current)

Description

Removes the last 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)];
  TPARemovePointEx(TPA, Point(2, 2), True);
  WriteLn(TPAToStr(TPA));
end.

Output:

(0,0);(4,5);(5,10)

See Also