# Feature or bug? (1:3).\*0

**URL:** https://discourse.julialang.org/t/feature-or-bug-1-3-0/14905
**Category:** General Usage
**Created:** [September 13, 2018, 12:43pm UTC](https://discourse.julialang.org/t/feature-or-bug-1-3-0/14905 "2018-09-13T12:43:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![loisel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/loisel/32/50626_2.png) [@loisel](https://discourse.julialang.org/u/loisel)
#### Post date: [September 13, 2018, 12:43pm UTC](https://discourse.julialang.org/t/feature-or-bug-1-3-0/14905/1 "2018-09-13T12:43:28Z")

</div>

**julia\>** (1:3)\*0

**ERROR:** ArgumentError: step cannot be zero

Stacktrace:

[1] **steprange\_last(** ::Int64, ::Int64, ::Int64 **)** at **./range.jl:190**

[2] **\_rangestyle** at **./range.jl:180** [inlined]

[3] **\_range** at **./range.jl:91** [inlined]

[4] **#range#29** at **./range.jl:76** [inlined]

[5] **#range** at **./none:0** [inlined]

[6] **broadcasted** at **./broadcast.jl:982** [inlined]

[7] **broadcasted** at **./broadcast.jl:1142** [inlined]

[8] **broadcast** at **./broadcast.jl:702** [inlined]

[9] \***(** ::UnitRange{Int64}, ::Int64 **)** at **./arraymath.jl:55**

[10] top-level scope at **none:0**

I’ve had to wrap all ranges in collect() everywhere in my code because otherwise my code is buggy for some input parameters.

---

<div class="post-metadata">

### Author: ![korsbo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/korsbo/32/15942_2.png) [@korsbo](https://discourse.julialang.org/u/korsbo)
#### Post date: [September 13, 2018, 12:48pm UTC](https://discourse.julialang.org/t/feature-or-bug-1-3-0/14905/2 "2018-09-13T12:48:37Z")

</div>

That looks like a natural behaviour to me. You may want to use `fill(0., 3)` instead.

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [September 13, 2018, 12:48pm UTC](https://discourse.julialang.org/t/feature-or-bug-1-3-0/14905/3 "2018-09-13T12:48:48Z")

</div>

See [Diagonal(1:n) cannot be multiplied by zero · Issue #29052 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/29052) and [Improve support for constructing zero-step float ranges by mbauman · Pull Request #29056 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/pull/29056)
