###User Defined Function###
_ArraySearch

###Description###
Finds an entry within a 1D or 2D array. Similar to _ArrayBinarySearch(), except that the array does not need to be sorted

###Syntax###
#include <Array.au3>
_ArraySearch ( Const ByRef $aArray, $vValue [, $iStart = 0 [, $iEnd = 0 [, $iCase = 0 [, $iCompare = 0 [, $iForward = 1 [, $iSubItem = -1 [, $bRow = False]]]]]]] )


###Parameters###
@@ParamTable@@
$aArray
	The array to search
$vValue
	What to search $aArray for
$iStart
	[optional] Index of array to start searching at
$iEnd
	[optional] Index of array to stop searching at
$iCase
	[optional] If set to 1, search is case sensitive
$iCompare
	[optional]
		0 Casting of variables to the same type (default), "string" = 0, "" = 0 or "0" = 0 match (If $iCase = 0)
		1 executes a partial search
		2 comparison match if variables have same type and same value
		3 compares using a regular expression pattern provided as $vValue
$iForward
	[optional] If set to 0, searches the array from end to beginning (instead of beginning to end)
$iSubItem
	[optional] Sub-index to search on in 2D arrays
$bRow
	[optional] If True then $iSubItem sets the row to search - False (default) searches columns
@@End@@

###ReturnValue###
@@ReturnTable@@
Success:	the index that $vValue was found at.
Failure:	-1 and sets the @error flag to non-zero.
@error:	1 - $aArray is not an array
	2 - $aArray is not a 1D or 2D array
	3 - $aArray is empty
	4 - $iStart is greater than $iEnd
	5 - Array not 2D and $bRow set True
	6 - $vValue was not found in array
@@End@@


###Remarks###
This function is likely to be slower than <a href="_ArrayBinarySearch.htm">_ArrayBinarySearch()</a> but is useful when the array cannot be sorted before the search.


###Related###
_ArrayBinarySearch, _ArrayFindAll


###Example###
@@IncludeExample@@
