28.05.2013, 15:25
Quote:
NEW QUESTION:
I also from time to time need to find the highest slot in an array that's "empty" (all zeros).. To do this I've been looping, again.. As such. Код:
for(new i=0;i<MAX_PROPERTIEs;i++) { if(HomeInfo[i][homeID] == 0) { // I'm able to check for homeID being zero because this value is assigned by DB. newArrID = i; break; } } |
Код:
for(new i=MAX_PROPERTIES;i>0;i--) { if(HomeInfo[i][homeID] == 0) { // I'm able to check for homeID being zero because this value is assigned by DB. newArrID = i; break; } }