for x in x1:del:x2-del
In the initial post, I should have written that that’s not a solution:
function func(x1, del, x2)
display(collect(x1:del:x2))
display(collect(x1:del:(x2-del)))
end
x1 = 0.0
x2 = 2.5
delx = 1.0
func(x1, del, x2)
In this case, x1:del:x2 is what I want, because all the values satisfy x < x2.
Unless you know the values of x1, x2, and del beforehand, it’s impossible to determine whether x2 or x2 - del is the right end of the UnitRange I want.