Home › Forums › Problems and solutions in GDL › Documentation elements, text handling › Trimming empty rows from array › Reply To: Trimming empty rows from array
Initially what I’m doing is loading the wall skin list values to a new array: originally it is stored in a fixed one with ?? rows. I usually have less than that, and when I want to display elements from the original, I only want to see the filled ones.
So to trim, I compare the values against zero. When it is not zero, the record gets copied – this is where the problem lies: I’m comparing a real number against zero. On the Achicad-Talk forum I found threads regarding this problem, and it seems there is not much to do about it, rather than eliminating exact comparisons and to replace them by a “smaller than” relation.
I’m not that comfortable with programming, so I am not sure whether this is the way to go, or a different approach is more sufficient.
Edit: Probably I could use a “while” statement with the original array, with a “bigger than” comparison.
Balazs Furton
Student of architecture @ Budapest University of Technology and Economics