range properties that work in foreach

2010-03-06 Thread Michael Rynn
On the D2 online pages (http://www.digitalmars.com/d/2.0/statement.html#ForeachStatement)there is Foreach over Structs and Classes with Ranges My question is , is there a working example of foreach ( e ; range )? Iteration over struct and class objects can be done with ranges, which means

Re: range properties that work in foreach

2010-03-06 Thread Lars T. Kyllingstad
Michael Rynn wrote: On the D2 online pages (http://www.digitalmars.com/d/2.0/statement.html#ForeachStatement)there is Foreach over Structs and Classes with Ranges My question is , is there a working example of foreach ( e ; range )? Iteration over struct and class objects can be done wit

Re: range properties that work in foreach

2010-03-06 Thread Lars T. Kyllingstad
Lars T. Kyllingstad wrote: Michael Rynn wrote: On the D2 online pages (http://www.digitalmars.com/d/2.0/statement.html#ForeachStatement)there is Foreach over Structs and Classes with Ranges My question is , is there a working example of foreach ( e ; range )? Iteration over struct and cla

Re: range properties that work in foreach

2010-03-06 Thread Jesse Phillips
Good range documentation comes from: http://digitalmars.com/d/2.0/phobos/std_range.html foreach only requires an Input Range.

Re: range properties that work in foreach

2010-03-07 Thread Walter Bright
Lars T. Kyllingstad wrote: Looks like you ran into a piece of hopelessly outdated documentation. The correct names are, in the same order: Thanks, I'll fix.

Re: range properties that work in foreach

2010-03-08 Thread Steven Schveighoffer
On Sun, 07 Mar 2010 04:29:59 -0500, Walter Bright wrote: Lars T. Kyllingstad wrote: Looks like you ran into a piece of hopelessly outdated documentation. The correct names are, in the same order: Thanks, I'll fix. I saw you fixed the table, but the examples are still wrong -Steve