Go to: Synopsis. Return value. MEL examples.

Synopsis

int floatArrayFind(float $item, int $index, float[] $list)

Return the index of item if it is in the array and -1 otherwise. The array may contain more than one occurrence of the item. This procedure will return the index of the first occurence of item starting at index.

Return value

None

Arguments

Variable Name Variable Type Description
$itemfloatThe float item to search for in the float array.
$indexfloatThe array index to begin the search at
$listfloat[]A list of float values.

MEL examples

	float $array1[] = { 1.0, 2.0, 3.0 };
	// ,Result:, 1.0 2.0 3.0 // 

	int $index = floatArrayFind( 1.0, 0, $array1 );
	// ,Result:, 0 // 

	$index = floatArrayFind( 2.0, 0, $array1 );
	// ,Result:, 1 // 

	$index = floatArrayFind( 3.0, 4, $array1 );
	// ,Result:, -1 // 

	$index = floatArrayFind( 0.0, 0, $array1 );
	// ,Result:, -1 //