# Three dots \`...\`

**URL:** <https://discourse.julialang.org/t/three-dots/46196>\
**Category:** New to Julia\
**Created:** [September 7, 2020, 1:11pm UTC](https://discourse.julialang.org/t/three-dots/46196 "2020-09-07T13:11:37Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![onButtonUp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/onbuttonup/32/3098_2.png) [@onButtonUp](https://discourse.julialang.org/u/onButtonUp)\
**Post date:** [September 7, 2020, 1:11pm UTC](https://discourse.julialang.org/t/three-dots/46196/1 "2020-09-07T13:11:38Z")

</div>

At various points in my exploration of Julia code, I find `...` being used. For example, in help for symbol `?Symbol`

```julia
Symbol(x...) -> Symbol

```

And, currently, I’m using the following code that includes `...` to create a data frame from an array (using the first row as the column titles).

```julia
DataFrame_wTitles = DataFrame([[anArray[2:end,i]...] for i in 1:size(anArray,2)], Symbol.(anArray[1,:]))

```

However, it’s difficult to find documentation on `...` or “three dots”, or “dots” . . . Broadcasting uses dot notation. It’s short and sweet notation, but I wonder how `...` is officially referred to and does it have several meanings.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [September 7, 2020, 1:15pm UTC](https://discourse.julialang.org/t/three-dots/46196/2 "2020-09-07T13:15:13Z")

</div>

It’s called splatting

---

<div class="post-metadata">

**Author:** ![mcabbott](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcabbott/32/6603_2.png) [@mcabbott](https://discourse.julialang.org/u/mcabbott)\
**Post date:** [September 7, 2020, 1:16pm UTC](https://discourse.julialang.org/t/three-dots/46196/3 "2020-09-07T13:16:17Z")

</div>

This is what the manual has, not easy to search for I agree!

[https://docs.julialang.org/en/v1/manual/faq/#What-does-the-…-operator-do?](https://docs.julialang.org/en/v1/manual/faq/#What-does-the-...-operator-do?)

---

<div class="post-metadata">

**Author:** ![onButtonUp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/onbuttonup/32/3098_2.png) [@onButtonUp](https://discourse.julialang.org/u/onButtonUp)\
**Post date:** [September 7, 2020, 1:19pm UTC](https://discourse.julialang.org/t/three-dots/46196/4 "2020-09-07T13:19:29Z")

</div>

splatting and slurping

Love it.

---

<div class="post-metadata">

**Author:** ![fbanning](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fbanning/32/14972_2.png) [@fbanning](https://discourse.julialang.org/u/fbanning)\
**Post date:** [September 7, 2020, 1:29pm UTC](https://discourse.julialang.org/t/three-dots/46196/5 "2020-09-07T13:29:30Z")

</div>

Others have answered already but I thought it might be useful to add the `?` answer:

```julia
help?> ...
search: ...

  ...

  The "splat" operator, ..., represents a sequence of arguments. ... can be used in function definitions, to indicate
  that the function accepts an arbitrary number of arguments. ... can also be used to apply a function to a sequence
  of arguments.

  Examples
  ≡≡≡≡≡≡≡≡≡≡

  julia> add(xs...) = reduce(+, xs)
  add (generic function with 1 method)

  julia> add(1, 2, 3, 4, 5)
  15

  julia> add([1, 2, 3]...)
  6

  julia> add(7, 1:100..., 1000:1100...)
  111107

```

So whenever you don’t know what a certain operator/symbol/whatever does, you can try the built-in `?` functionality.

---

<div class="post-metadata">

**Author:** ![kevbonham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevbonham/32/216165_2.png) [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Post date:** [September 7, 2020, 5:11pm UTC](https://discourse.julialang.org/t/three-dots/46196/6 "2020-09-07T17:11:00Z")

</div>

> [@fbanning](#):
>
> So whenever you don’t know what a certain operator/symbol/whatever does, you can try the built-in `?` functionality.

This is excellent advice, though one thing it falls down on us the ternary operator. Took me forever to figure out how to google “question mark and colon syntax”…

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [September 7, 2020, 5:29pm UTC](https://discourse.julialang.org/t/three-dots/46196/7 "2020-09-07T17:29:40Z")

</div>

```julia
help?> ?
search: ? ?:

  a ? b : c

  Short form for conditionals; read "if a, evaluate b otherwise evaluate c". Also known as the ternary operator (https://en.wikipedia.org/wiki/%3F:).

  This syntax is equivalent to if a; b else c end, but is often used to emphasize the value b-or-c which is being used as part of a larger expression, rather than the side effects that evaluating b or c may have.

  See the manual section on control flow for more details.

  Examples
  ≡≡≡≡≡≡≡≡≡≡

  julia> x = 1; y = 2;
  
  julia> println(x > y ? "x is larger" : "y is larger")
  y is larger

```

---

<div class="post-metadata">

**Author:** ![kevbonham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevbonham/32/216165_2.png) [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Post date:** [September 7, 2020, 5:38pm UTC](https://discourse.julialang.org/t/three-dots/46196/8 "2020-09-07T17:38:52Z")

</div>

🤯

---

<div class="post-metadata">

**Author:** ![purplishrock](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/purplishrock/32/13451_2.png) [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Post date:** [September 7, 2020, 6:41pm UTC](https://discourse.julialang.org/t/three-dots/46196/9 "2020-09-07T18:41:25Z")

</div>

LOL. Julia user since 0.5.something. Just now finding out ? gives you a help repl.

however, when I tried to do help on ?: as per @nilshg 's example this is what happens…

```julia
help?> ?
search:

  Welcome to Julia 1.4.2. The full manual is available at

  https://docs.julialang.org/

  as well as many great tutorials and learning resources:

  https://julialang.org/learning/

  For help on a specific function or macro, type ? followed by its name, e.g.
  ?cos, or ?@time, and press enter. Type ; to enter shell mode, ] to enter
  package mode.

julia> 

```

typing ? at the help?\> prompt drops me back to the repl where as in his example it seems to drop you into a search prompt ??

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [September 7, 2020, 7:03pm UTC](https://discourse.julialang.org/t/three-dots/46196/10 "2020-09-07T19:03:46Z")

</div>

Yes, this seems to be a 1.5 addition.

---

<div class="post-metadata">

**Author:** ![purplishrock](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/purplishrock/32/13451_2.png) [@purplishrock](https://discourse.julialang.org/u/purplishrock)\
**Post date:** [September 7, 2020, 7:04pm UTC](https://discourse.julialang.org/t/three-dots/46196/11 "2020-09-07T19:04:35Z")

</div>

well then it’s time to upgrade ! 🙂

---

<div class="post-metadata">

**Author:** ![kevbonham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevbonham/32/216165_2.png) [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Post date:** [September 8, 2020, 12:29am UTC](https://discourse.julialang.org/t/three-dots/46196/12 "2020-09-08T00:29:10Z")

</div>

> [@nilshg](#):
>
> Yes, this seems to be a 1.5 addition.

Oh thank God. It was several years ago when I went looking, and I swear I tried this. You had me worried 😃

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [September 8, 2020, 6:53am UTC](https://discourse.julialang.org/t/three-dots/46196/13 "2020-09-08T06:53:09Z")

</div>

[https://github.com/JuliaLang/julia/pull/35637](https://github.com/JuliaLang/julia/pull/35637)
