olety / cjass

Preserving cjass code from code.google.com/p/cjass
0 stars 0 forks source link

Recursive for loops (uses groups pick) - desing question #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
nothing foo () {
    for (unit u; UnitsInRange(...)) {
        // ...
        ExecuteFunc ("foo")
    }
}

We may pass to for loop additional argument, to fix all posible bugl, somethin 
like:

group g = CreateGroup()
for (unit u; UnitIn...(); g) {}
DestroyGroup (g)

or maybe better variation:

for (unit u; UnitIn...() use g) {}

Original issue reported on code.google.com by adi...@gmail.com on 9 Aug 2011 at 7:22

GoogleCodeExporter commented 9 years ago
Unable to understand.
What is the problem and how it can solve it? %(

Original comment by sbratchi...@gmail.com on 10 Aug 2011 at 2:15

GoogleCodeExporter commented 9 years ago
for (unit u; UnitIn...() use g) {} <--- I did so.

Original comment by adi...@gmail.com on 12 Aug 2011 at 6:04