Sorry, I am embarassed to say I've just tried the for equivalent and it works with t[i] as the iterating variable.

import std.stdio;

int[3] t;

void foo (int i) {
  if (i == 3)
    writef("%s\n", t);
  else for (t[i] = 0; t[i] < 3; t[i]++)
    foo(i+1);
}

void main() {
  foo(0);
}

Sorry, yet another overhasty post

Reply via email to