On Thursday, March 10, 2016 at 12:08:25 PM UTC+8, Eric Forgy wrote:
>
> I was also trying my package StringInterpolations.jl. I could get this to 
> work:
>
> x = 2
> @interpolate "I like \$x"
>
> But this did not work
>
> x = 2
> s = "I like \$x"
> @interpolate s
>
> In the former case, the argument is a string. In the latter, the argument 
> is a symbol. Any idea how I can fix this?
>
> Here is the line in my package:
>
>
> https://github.com/EricForgy/StringInterpolation.jl/blob/master/src/interpolate.jl#L53
>

In my second example above, 

x = 2
s = "I like \$x"
@interpolate s

the macro is taking `s` to be a symbol when I want the string passed into 
the macro. How do I that? 

Reply via email to