On Thu, 02 Jun 2011 17:38:38 -0400, Andrej Mitrovic <andrej.mitrov...@gmail.com> wrote:

Well actually all I wanted was a counter variable. I can put the thing
in a for loop or while loop, but I thought that a counter variable is
something that the compiler can always add without too much thinking.

Also, BTW, you can still do this with a foreach loop:

size_t idx = ~0;  //hacky, I know.
foreach(x; range)
{
   ++idx;
   ...
}

-Steve

Reply via email to