# Parentheses in a macro invocation

**URL:** <https://discourse.julialang.org/t/parentheses-in-a-macro-invocation/22793>\
**Category:** General Usage\
**Tags:** question\
**Created:** [April 5, 2019, 11:55am UTC](https://discourse.julialang.org/t/parentheses-in-a-macro-invocation/22793 "2019-04-05T11:55:47Z")\
**Posts on this page:** 3\
**Page:** 1

<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:** [April 5, 2019, 11:55am UTC](https://discourse.julialang.org/t/parentheses-in-a-macro-invocation/22793/1 "2019-04-05T11:55:47Z")

</div>

Suppose I have a macro that is called like

```julia
@mac a, b, c = d

```

(for a concrete example, think of `Parameters.@unpack`).

What is the proper way of writing this with the `()` invocation form, ie how to complete

```julia
@mac(a, ...)

```

?

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [April 5, 2019, 12:00pm UTC](https://discourse.julialang.org/t/parentheses-in-a-macro-invocation/22793/2 "2019-04-05T12:00:08Z")

</div>

`@mac( (a, b, c = d) )`… I mean, you have one argument and that is the whole `tuple` expression. You can of course write your macro as something like `@mac(a, b, c = d)` but then you take 3 arguments and have to change the macro body.

---

<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:** [May 8, 2019, 2:45pm UTC](https://discourse.julialang.org/t/parentheses-in-a-macro-invocation/22793/3 "2019-05-08T14:45:48Z")

</div>

I found that

```julia
@mac (a, b) = c

```

works nicely, too.
