Click or drag to resize

AScan<T> Function <ARRAY OF<T>, Func<T, Boolean>, Int32>

Scan an array until an expression returns TRUE.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.0
Syntax
 FUNCTION AScan<T>(
	aTarget AS ARRAY OF<T>,
	act AS Func<T, LOGIC>,
	nStart AS LONG
)
WHERE T : NEW()
 AS DWORD

Parameters

aTarget
Type: ARRAY OF<T>
The array whose element will be scanned.
act
Type: Func<T, Boolean>
The lambda expression to use for looking up the correct element.
nStart
Type: Int32
The number of the element to start with.

Type Parameters

T

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