is it possible to sort a float range ?

Jordan Wilson wilsonjord at gmail.com
Wed Jun 23 22:30:29 UTC 2021


On Wednesday, 23 June 2021 at 19:53:24 UTC, someone wrote:
> Please, look for the line marked +++
>
> This is a structure with a public property returning a (still 
> unsorted) range built on-the-fly from already-set properties, a 
> basic range from a to z with n step where some specific values 
> can be added in-between. The range is a float which I am 
> currently using for currency (horrible) and later plan to move 
> it to decimal 10 or the like.
>
> [...]

```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```.


More information about the Digitalmars-d-learn mailing list