help?> range
search: range nzrange LinRange UnitRange StepRange StepRangeLen UnitRangeTransform trailing_zeros AbstractRange trailing_ones OrdinalRange
range(start[, stop]; length, stop, step=1)
Given a starting value, construct a range either by length or from start to stop, optionally with a given step (defaults to 1, a UnitRange). One
of length or stop is required. If length, stop, and step are all specified, they must agree.
If length and stop are provided and step is not, the step size will be computed automatically such that there are length linearly spaced elements
in the range (a LinRange).
If step and stop are provided and length is not, the overall range length will be computed automatically such that the elements are step spaced (a
StepRange).
stop may be specified as either a positional or keyword argument.
│ Julia 1.1
│
│ stop as a positional argument requires at least Julia 1.1.
Examples
≡≡≡≡≡≡≡≡≡≡
julia> range(1, length=100)
1:100
julia> range(1, stop=100)
1:100
julia> range(1, step=5, length=100)
1:5:496
julia> range(1, step=5, stop=100)
1:5:96
julia> range(1, 10, length=101)
1.0:0.09:10.0
julia> range(1, 100, step=5)
1:5:96