Re: Macro that generates procs

2018-11-16 Thread bingobangobongo
Oh, I didnt know, thanks Araq

Re: Macro that generates procs

2018-11-16 Thread Araq
You cannot dynamically generate procs.

Re: Macro that generates procs

2018-11-16 Thread juancarlospaco
I think `&" "` and `fmt" "` wont work inside a macro, use `" " & " "` or `format( )`.

Re: Macro that generates procs

2018-11-16 Thread bingobangobongo
thanks, I got it working without passing params to the macro function, what I cannot seem to figure out is how to do it when trying to dynamically generate the string that will get converted to a macro.

Re: Macro that generates procs

2018-11-16 Thread juancarlospaco
[https://github.com/juancarlospaco/nim-presentation-slides/blob/master/ejemplos/avanzado/macros/macro_from_string.nim](https://github.com/juancarlospaco/nim-presentation-slides/blob/master/ejemplos/avanzado/macros/macro_from_string.nim) More examples on the same folder.

Macro that generates procs

2018-11-15 Thread bingobangobongo
Hi, I recently started toying with templates and macros in nim and even though they seem very powerful I haven't been able to correctly use macros yet. I'm trying to create a macro that would generate a proc with some fixed parts in its body when being called, something in the lines of (not work