Hi guys,
I've been digging into customview creation, and found myself using quiete a few For/Next loops
It got me thinking...
Instead of having this:
How difficult would it be to have a single For/Next loop that would take in account the array dimension?
like
and above all, would it be code efficient?
I've been digging into customview creation, and found myself using quiete a few For/Next loops
It got me thinking...
Instead of having this:
B4X:
For n = 0 to 5
label(n).initialize("")
Next
For n = 0 to 10
Btn(n).initialize("")
Next
For n = 0 to 15
dowhatever needs to be done
Next
How difficult would it be to have a single For/Next loop that would take in account the array dimension?
like
B4X:
For n = 0 to 15
If n < label.length then initialize labels
If n < btn.length then initialize btns
etc
Next
and above all, would it be code efficient?