as i was saying i simply used ; in the example to get a point across. Whatever character it uses is what it uses I suppose i wasnt being very PC in the sample.

One such advantage is as I mentioned in my other post. The iterator would only need to be parsed by the script parser once. The rest of its usage would be done in memory. This alone should be anough argument for its implementation. However lets discuss a few more.

With a typical while loop you create a variable and set it to an initial value. thats 1 line of code (can be optimized). The header of a while loop is an additional line so far were up to 2. The incrememnt is yet an additional line (/inc %var) now were up to 3. to ilustrate this lets use a sample

var %inc = 1
while (%inc <= 10) {
code
inc %inc
}

now with a for the declarator and interator is all incorporated into the for's header the same sample using a for (and your suggested comma) would be as follows

for (var %inc = 1,%inc <= 10,inc %inc) {
code
}

overall readability is easier to see. you have fewer lines that need to be parsed (wich is slower)

you could further optimize this by not requireing the var command to declare %inc. since its understood that the first field is a declarator. for example

for (%inc = 1,%inc <= 10,inc %inc) {
code
}

the itterator could be further optimized down to one value such as..

for (%inc = 1,%inc <= 10,+2) {
code
}

in this case %inc is incremented 2 values per ittereation you could use a negative value for decrement. The last example shows that most of the operations on %inc will be done in memory and only parsed once.

Its infinately easier to debug code that uses fewer lines. Certainly code that has several while loops. For nested loops your looking at declaring 2 counters as well as 2 lines for increment/decrememnt and so on.

The goal here is to perform as much "in memory" as possible because its heaps faster than parsing additional lines.


Have Fun smile