Saving the values of all variabled declared in a block
Since this will be used at toplevel anyway, I would just wrap all the parameters in a module.

macro param_save(file, blk)
    modname = gensym()
    Expr(:toplevel,
        Expr(:using, :JLD),
        Expr(:module, false, modname, esc(blk)),
        quote
            JLD.save($file, Dict(
                string(n) =&gt; eval($modname, n)
                for n in names($modname, true)
                if n ≠ $(Meta.quot(modname))))
        end)
end