Multiple expressions in for loops

From CodeCodex

Implementations[edit]

Java[edit]

You do it "à la C".

public class MultipleFor{
  public static void main (String [] args){
    for (int i=0, j=0; i < 10; i++, j--)
      System.out.println ("i = " + i + " j= " + j);
    }
}

Tcl[edit]

for {set i 0;set j 0} {$i < 10} {incr i;incr j -1} {puts "i = $i j = $j"}