Difference between revisions of "ReverseTPA"

From SCAR Divi Manual
Jump to: navigation, search
(Redirected page to TPAInvert)
 
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
#REDIRECT [[TPAInvert]]
+
==Definition==
 +
<source lang="scar" lines="false">
 +
procedure ReverseTPA(var TPA: TPointArray);
 +
</source>
 +
 
 +
==Availability==
 +
SCAR Divi 3.36 > Current
 +
 
 +
===Aliases===
 +
*TPAInvert (SCAR Divi 3.26 > 3.34)
 +
*InvertTPA (SCAR Divi 3.26 > 3.35)
 +
 
 +
==Description==
 +
This function reverses the order of a given [[TPointArray]] '''TPA'''.
 +
 
 +
==Example==
 +
<source lang="scar">
 +
var
 +
  TPA: TPointArray;
 +
 
 +
begin
 +
  TPA := [Point(0, 0), Point(2, 2), Point(5, 10)];
 +
  ReverseTPA(TPA);
 +
  WriteLn(TPAToStr(TPA));
 +
end.
 +
</source>
 +
 
 +
Output:
 +
(5,10);(2,2);(0,0)
 +
 
 +
==See Also==
 +
*[[SortTPA]]
 +
*[[SortTPAEx]]
  
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:TPA Functions]]
 
[[Category:TPA Functions]]
 +
[[Category:Array Functions]]

Latest revision as of 21:53, 7 September 2012

Definition

procedure ReverseTPA(var TPA: TPointArray);

Availability

SCAR Divi 3.36 > Current

Aliases

  • TPAInvert (SCAR Divi 3.26 > 3.34)
  • InvertTPA (SCAR Divi 3.26 > 3.35)

Description

This function reverses the order of a given TPointArray TPA.

Example

var
  TPA: TPointArray;
  
begin
  TPA := [Point(0, 0), Point(2, 2), Point(5, 10)];
  ReverseTPA(TPA);
  WriteLn(TPAToStr(TPA));
end.

Output:

(5,10);(2,2);(0,0)

See Also