Hi all,
For example, I have an array with many integers and i need to search one of the integer. Could someone help?
Thanks in advance
Hi all,
For example, I have an array with many integers and i need to search one of the integer. Could someone help?
Thanks in advance
Well all elements of an array have an index associated, so Fu[0] would be the first value of array "Fu", and Fu[1] the second, etc. So you can just iterate through those. If your array is Fu, and the int you're looking for is Bar, An example might be:
var n : int = 0;
for (n = 0; n < Fu.length; n++){
if ( Fu[n] == Bar )
DoSomething();
}
var numbers = new int[500];
numbers[456] = 7;
if (7 in numbers) print (“Oh, look, a 7!”);