- Joined
- Aug 23, 2008
- Messages
- 2,319
I got a boolean variable with a bunch of arrays and I'd like to know if it's possible to check which of the array's is the first on a row to be True or False.
Example:
Boolean[1] = False
Boolean[2] = False
Boolean[3] = False
Boolean[4] = False
Boolean[5] = False
Boolean[6] = False
Boolean[7] = False
Boolean[8] = False
Boolean[9] = False
Boolean[10] = False
Boolean[11] = True
Boolean[12] = True
Boolean[13] = True
Boolean[14] = True
Boolean[15] = True
Boolean[16] = True
Boolean[17] = True
Boolean[18] = True
Boolean[19] = True
Boolean[20] = True
In this example, I want to check for Boolean[11] only. Boolean 12 and higher should not be effected.
I was thinking about a Integer A loop, but I don't know how I should only check for the first that passes the 'test'.
Example:
Boolean[1] = False
Boolean[2] = False
Boolean[3] = False
Boolean[4] = False
Boolean[5] = False
Boolean[6] = False
Boolean[7] = False
Boolean[8] = False
Boolean[9] = False
Boolean[10] = False
Boolean[11] = True
Boolean[12] = True
Boolean[13] = True
Boolean[14] = True
Boolean[15] = True
Boolean[16] = True
Boolean[17] = True
Boolean[18] = True
Boolean[19] = True
Boolean[20] = True
In this example, I want to check for Boolean[11] only. Boolean 12 and higher should not be effected.
I was thinking about a Integer A loop, but I don't know how I should only check for the first that passes the 'test'.