number ranges

forkit forkit at gmail.com
Mon Jan 17 22:22:19 UTC 2022


On Monday, 17 January 2022 at 22:06:47 UTC, H. S. Teoh wrote:
>
> Basically,
>
> 	foreach (i; a .. b)
>
> is equivalent to:
>
> 	for (auto i = a; i < b; i++)
>
> Just think of that way and it will make sense.
>

I think it's fair to say, that I'm familiar with 0-based indexing 
;-)

my concern was with the 1..5 itself.

In terms of what makes sense, it actually makes more sense not to 
use it, at all ;-)



More information about the Digitalmars-d-learn mailing list