PosInList

Prev Next Home Home Table Of Contents Index

PosInList (String,Array) : Number

Scans a string array looking for a match on String and returns the array index of the first matched string if found or a zero if not found.


Example:
X[1] = 'JOE' X[2] = 'KEVIN' X[3] = 'MARC' X[4] = 'PETE' Writeln PosInList('KEVIN',X) ;returns 2

You can also pass two numbers to PosInList which define the start and end positions in the list to search.


Example:
Writeln PosInList('KEVIN',X,2,3) ;returns 2

See Also: PosInListLeft PosInListPartial PosInSortedList

Category: Array

Prev Next Home Home Table Of Contents Index

Sponsors
Shopping
Forum
Forum
email
EMail
Index
Index
Home
Home