Topic Path: Symbol Reference > Functions > PosInSmallIntArray Function
PosInSmallIntArray Function

Determines the position of the specified SmallInt value in an array of SmallInt values.

function PosInSmallIntArray(
    const ASearchInt: SmallInt; 
    AArray: array of SmallInt
): Integer;
Value to locate in the array.
Values to be searched for the matching value. 

Integer - Position of the value in the array, or -1 when not found.

PosInSmallIntArray is an Integer function used to locate the position of a specified SmallInt value in an array of SmallInt values. 

ASearchInt indicates the SMallInt value to locate in the target array. 

AArray contains the array of SmallInt values to be searched for the value specified in ASearchInt. 

PosInSmallIntArray uses the Low and High functions to determine to the bounds of the array containing SmallInt values. The return value contains the index position of ASearchInt in the array when the first matching value is located. The return value will contain -1 when ASearchInt cannot be located in the array of SmallInt values.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.