Save variable to variable name

This should work:

@eval save($s, joinpath(repo, $("$s.jldb")))

You need to rounds of $: one for interpolating the symbol into the expression; another to interpolate the symbol name into the string (exactly like you’d have to without metaprogramming)

1 Like