range(stridable = true)
totally different types?
In fact, I cannot see how
1 .. 10 by 1
1 .. 10
are any different. Both have unit stride, i.e. a stride of 1. Why
one if considered stridable and the other not is totally beyond me.
This is important when you want to specify a parameter to a routine which
can be either a stridable or non-stridable range. How is this done now?
As far as I can see, it cannot be done. For example
proc test(r : range)
will not accept
test(1 .. 10 by 1)
If I change the type of ‘r’ such that it reads as
r : range(stridable = true)
the compiler is happy, but then my routine test will then not accept
What am I missing or has type strictness gone overboard?
Regards - Damian
Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
Ph:+61-2-8571-0847 … Fx:+61-2-9692-9623 | unsolicited email not wanted here
Views & opinions here are mine and not those of any past or present employer