Click or drag to resize

AScanExact Function (Array, Usual, Usual, Usual)

Scan an array until an exact match with a value is found or a code block returns TRUE.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.01
Syntax
 FUNCTION AScanExact(
	aTarget AS ARRAY,
	uSearch AS USUAL,
	nStart AS USUAL := NIL,
	nCount AS USUAL := NIL
) AS DWORD
View Source

Parameters

aTarget
Type: Array
The array whose element will be scanned.
uSearch
Type: Usual
The value to search for.
nStart (Optional)
Type: Usual
The number of the element to start with.
nCount (Optional)
Type: Usual
The number fo elements the scan.

Return Value

Type: UInt32
If uSearch is a code block then the functions returns the position of the first element for which the code block returns TRUE. Otherwise it returns the position of the first matching element. The function returns 0 if no match is found.
See Also