DMD 0.170 release
Bill Baxter
wbaxter at gmail.com
Wed Oct 18 05:03:51 PDT 2006
Oskar Linde wrote:
> Walter Bright wrote:
>
>> Bill Baxter wrote:
>>
>>> I don't see how it helps. If you can already do:
>>> foreach(T item; &collection.reversed()) { }
>>
>>
>> That doesn't work for arrays.
>
>
> In what way does it not work? I have been doing:
>
> foreach(x; "abcd".reverseView())
> writef("%s",x);
>
> prints "dcba"
>
> For any type of built in array for a very long time (long before 0.170),
> and it certainly seems to work for me.
How do you do that? I just get
: undefined identifier reverseView
: function expected before (), not reverseView of type int
: cannot infer type for x
More information about the Digitalmars-d-announce
mailing list