handful and interval

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Sep 2 23:27:13 PDT 2012


On 9/3/12 6:47 AM, Walter Bright wrote:
> On 9/2/2012 4:40 PM, Andrei Alexandrescu wrote:
>> On 9/2/12 10:24 PM, Walter Bright wrote:
>>> On 9/2/2012 7:45 AM, Andrei Alexandrescu wrote:
>>>> On 9/2/12 4:22 PM, Andrei Alexandrescu wrote:
>>>> [snip]
>>>>
>>>> The alternative would be to simply define these as functions:
>>>>
>>>> if (a.among("struct", "class", "union")) { ... }
>>>> if (b.between(1, 100)) { ... }
>>>
>>> Is between inclusive or not of the endpoints?
>>
>> After quite a bit of thought, I think inclusive is the right way.
>
> Then there's no way to specify an empty interval. I suppose with
> "between" that would not be relevant.

Apparently I didn't think enough :o).

Andrei



More information about the Digitalmars-d mailing list