cArray: TrueForAll

TrueForAll

Returns a boolean indicating if all elements in the array matched the criteria.



 Public Function TrueForAll(
	  ByRef Arr As Variant,
	  ByVal AddressOfMatch As Long ) As Boolean

Parameters

Arr
[ByRef] Variant. The array to compare against the criteria.
AddressOfMatch
[ByVal] Long. The callback address used to match the criteria.

Return Values

Boolean -  Indication of the entire array matching the criteria or not.

Remarks

The function signature for the callback has a specific format.

 Public Function TrueForAllCallback(ByRef x As [Array Datatype]) As Boolean
     ' return True if x matches your criteria.
 End Sub
 
The [Array Datatype] must be replaced with the datatype of the array. If the array is an array of Variants, then [Array Datatype] would be a Variant, not any specific sub-type within the variants of the array.

See Also

Project VBCorLib Overview Class cArray Overview cArray Properties cArray Methods SortKeyEx