I have an array with the contents of 0,2,3,0,5,0. I would like to be able to count how many times a number exists in the array. So in this example, I'd like to be able to store in a variable the number 3 when testing how many times 0 exists within the array.
I'm searched the forums looking for an answer but am coming up empty or confused. I attempted the following without success:
MyArray > For each X element
MyArray > Value at MyArray.CurX = 0
action: System > Set myVar to MyArray.PickedCount
I would think the first two lines would be okay for testing each array object to see if it's zero but I can't figure out the action to capture the count. Also, I didn't want to use an iterating variable to add to my counting variable because the For Each statement will run 40+ times a second..
Can someone help?