Difference between revisions of "TIAPos"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> function TIAPos(const TIA: TIntArray; const Int: Integer): Integer; </source> ==Availability== SCAR Divi 3.28 > Current ==Desc...")
 
(No difference)

Latest revision as of 10:39, 24 October 2011

Definition

function TIAPos(const TIA: TIntArray; const Int: Integer): Integer;

Availability

SCAR Divi 3.28 > Current

Description

Finds a given integer value in the given TIntArray TIA and returns the position of the integer in the array. The function returns -1 if the integer is not found. An extended function with additional functionality is available as TIAPosEx.

Example

begin
  WriteLn(TIAPos([1, 2, 3], 3));
  WriteLn(TIAPos([1, 2, 3], 4));
end.

Output:

2
-1

See Also