Another way to do this, better perdorming with out all the redundant writes. Travel down the array (vertically, along the i) and if the value is not x, you add it to a string (or chr array of size row_limit for speed) and delete them when you add them, then when you hit the bottom, you empty the array back up. So the first column would make an array
[y,r,r,NULL,NULL...]
Keep track of the last value (index 2 in this case) and replace it as you travel back up the row. Iterate across the columns and you’re done.
__________________
Donate Blood!
"Love is not finding the perfect person, but learning to see an imperfect person perfectly." -Sam Keen
|