is it possible to sort a float range ?

Jordan Wilson wilsonjord at gmail.com
Wed Jun 23 23:02:34 UTC 2021


On Wednesday, 23 June 2021 at 22:46:28 UTC, Steven Schveighoffer 
wrote:
> On 6/23/21 6:30 PM, Jordan Wilson wrote:
>> On Wednesday, 23 June 2021 at 19:53:24 UTC, someone wrote:
>>> [...]
>> 
>> ```sort``` returns a ```SortedRange```, and I believe you wish 
>> to return a float. So you can do either ```return 
>> lnumRange.sort!(...).array;```, or you can do 
>> ```lnumRange.sort!(...); return lnumRange```.
>
> Use the `release` method:
>
> ```d
> return lnumRange.sort!(...).release;
> ```
>
> -Steve

Wow...learn something new every day, cheers!

Jordan


More information about the Digitalmars-d-learn mailing list