# Macro Question where I can't do the proper substition

**URL:** https://discourse.julialang.org/t/macro-question-where-i-cant-do-the-proper-substition/31413
**Category:** General Usage
**Created:** [November 23, 2019, 6:38am UTC](https://discourse.julialang.org/t/macro-question-where-i-cant-do-the-proper-substition/31413 "2019-11-23T06:38:25Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Qiyamah](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/qiyamah/32/2660_2.png) [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)
#### Post date: [November 23, 2019, 6:38am UTC](https://discourse.julialang.org/t/macro-question-where-i-cant-do-the-proper-substition/31413/1 "2019-11-23T06:38:25Z")

</div>

```nohighlight
julia> macro testy()
           args=[:T,:U,:M]
           code = :(foreach(a->println(typeof(a)),$args))
           quote
               macro qq($(args...))
                   $code |>esc
               end
           end |> esc
       end
@testy (macro with 1 method)

julia> @testy
@qq (macro with 1 method)

julia> @qq Int Int Int
Symbol
Symbol
Symbol

```

I want them to print DataType instead of Symbol, that means those args should be evaluated within macro with $.

How can I do that?

Thanks

---

<div class="post-metadata">

### Author: ![longemen3000](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/longemen3000/32/7298_2.png) [@longemen3000](https://discourse.julialang.org/u/longemen3000)
#### Post date: [November 23, 2019, 7:14am UTC](https://discourse.julialang.org/t/macro-question-where-i-cant-do-the-proper-substition/31413/2 "2019-11-23T07:14:08Z")

</div>

maybe this?

```julia
macro qq2(arguments...)
    quote
        for x in $arguments
            println(typeof(eval(x)))
        end
    end 
end 

```

---

<div class="post-metadata">

### Author: ![Qiyamah](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/qiyamah/32/2660_2.png) [@Qiyamah](https://discourse.julialang.org/u/Qiyamah)
#### Post date: [November 23, 2019, 7:18am UTC](https://discourse.julialang.org/t/macro-question-where-i-cant-do-the-proper-substition/31413/3 "2019-11-23T07:18:24Z")

</div>

Nope that s not gonna work for me, I am looking for a syntactic way of writing

`:($ x)`

I guess… where $ is not evaluated until I place it.

---

<div class="post-metadata">

### Author: ![longemen3000](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/longemen3000/32/7298_2.png) [@longemen3000](https://discourse.julialang.org/u/longemen3000)
#### Post date: [November 23, 2019, 7:22am UTC](https://discourse.julialang.org/t/macro-question-where-i-cant-do-the-proper-substition/31413/4 "2019-11-23T07:22:10Z")

</div>

maybe try `$$` ?
