Array Slice Ranges
Don Clugston
dac at nospam.com.au
Thu Nov 9 13:18:36 PST 2006
> I also like to yet again say that having ranges as a type that can
> easily be based around would be neat.
>
> bool checkAge(int age, int min, int max) { ... }
> auto ok = checkAge(bar, 18, 25);
> or
> bool checkAge(int age, int$ range) { ... }
> auto ok = checkAge(bar, 18...25);
>
> Well how to denote a range type, is something I have not figured out
> yet. So I went for a $ suffix in the example.
bool checkAge(int age, int..int range) { ... }
?
More information about the Digitalmars-d
mailing list