Allowing Expressions such as (low < value < high)

"Nordlöw" via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Sep 4 13:29:08 PDT 2014


On Thursday, 4 September 2014 at 20:03:57 UTC, Nordlöw wrote:
>     if (low < value < high)

An alternative could be

     if (value in low..high)

but then the problem would be to remember that this range is 
actually

     [low..high[

to be compliant with range indexing semantics.

But it could still be a useful a quite self-explanatory syntax.


More information about the Digitalmars-d-learn mailing list