The int/uint::range methods would seem to do the job: for
uint::range(0, 10) |i| { io::println(fmt!("%u", i)); }

Cheers,
Josh

On 1 February 2013 12:14, Alexander Stavonin <a.stavo...@gmail.com> wrote:
> Have we a pretty looks solution for auto incrementation counters during 
> loops? I mean something like C/C++ style for loop.I found an example in the 
> manual "10.5 For loops" but it looks ugly with counter outside the loop.  Is 
> it only way for solving problem?
>
> Thanks.
> _______________________________________________
> Rust-dev mailing list
> Rust-dev@mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to