Re: [rust-dev] for loop

2013-05-30 Thread Steve Klabnik
I literally committed an example of using this just today: https://github.com/mozilla/rust/pull/6841/files ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev

Re: [rust-dev] for loop

2013-05-30 Thread jeaye
Perhaps with the following (not tested) for int::range_step(hi, low, step) or for int::range_step(hi, low, -step) J On 2013-05-30 16:26, Renato Lenzi wrote: with fot int::range(low,hi)  i can loop from low to h1-1 with for int::range_step(low, hi, step)  i can loop for low to hi-1 with step "

Re: [rust-dev] for loop

2013-05-30 Thread Lindsey Kuper
On Thu, May 30, 2013 at 6:26 PM, Renato Lenzi wrote: > with > fot int::range(low,hi) > i can loop from low to h1-1 > > with > for int::range_step(low, hi, step) > i can loop for low to hi-1 with step "step" > > with > for int::range_rev(hi, low) > i can loop from hi to low, reverse mode > > but...

[rust-dev] for loop

2013-05-30 Thread Renato Lenzi
with fot int::range(low,hi) i can loop from low to h1-1 with for int::range_step(low, hi, step) i can loop for low to hi-1 with step "step" with for int::range_rev(hi, low) i can loop from hi to low, reverse mode but... how can loop from hi to low with step other than 1? range_rev_step is obviou