Is $(symbol(string("gen_", x))) what you're looking for?
On 7 January 2015 at 01:28, Chi-wei Wang <[email protected]> wrote:
> Hi, everyone.
>
> I'd like to do something like following C code in Julia.
>
> #define gen_func(x) \
> void f_##x() { \
> }
>
> I tried the following Julia code, but I have no idea how to get 'gen_'
> appended in front of the function name.
>
> macro gen_func(x)
> return esc(quote
> function $x()
> # do something
> end
> end)
> end
>
>
>
>
