In uniface (horrible language) you can use indirection to simplify reppetitions. Dephified it would look like something like this:
Delphi-Quelltext
1:
| for count := 1 to 10 do @edit[count].text := 1; |
in Delphi I curretly do
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10:
| edit1.text := 1; edit2.text := 1; edit3.text := 1; edit4.text := 1; edit5.text := 1; edit6.text := 1; edit7.text := 1; edit8.text := 1; edit9.text := 1; edit10.text := 1; |
Can anyone think of a way to reduce that chunk of code into something less space consuming.
thanks
Lenny
Moderiert von
Klabautermann: Delphi-Tags hinzugefügt.