Error: no property 'sort' for type 'ulong[string]', or sometimes not ...

Derix derix at dexample.com
Sun Oct 20 10:33:22 PDT 2013


> Associative arrays are not sortable and have no defined order 
> of element pairs.
Yep, that's definitely the point that I missed.

>You can get an array of its values and sort
> that, by using the `values` property:
> ---
> import std.algorithm : sort;
> import std.stdio : writeln;
>
> foreach(value; aa.values.sort())
> {
>     writeln(value);
> }
> ---

OK, I get the idea. I am still a bit removed from navigating the 
numerous libraries, but I'll guess I'll get used to it.

>> And oh, maybe this is not the right place for a beginner ? Is 
>> there any better place ?
>
> The D.learn group is the most appropriate for these kinds of 
> questions :)

Yep, found out later that it was right in front of me, d'oh ;-)


thanks a lot for your spot-on answers !



More information about the Digitalmars-d mailing list