In the following case:
With[{x=1,y=2},Print[x+y]]
the values of x and y are declared in the list of local variables. How to transfer the values of x and y into With[] from an external list, like:
abc:={x=1,y=2}; With[abc,Print[x+y]]
This list of values must be understood in my case as true only when it is applied (locally true).
Unevaluated[With[abc, Hold[x + y]]] /. OwnValues[abc]there should be a nice duplicate somewhere. – Kuba Jan 08 '16 at 13:39With– Jason B. Jan 08 '16 at 13:47{x=1}evaluate naturally and their evaluation has significant consequences (settingx). They can be kept unevaluated, but it's difficult and error-prone to do so. Instead store the parameter values in a list of rules (or association) and use something like thewithRulesfunction I describe here. – Szabolcs Jan 08 '16 at 13:493) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – Jan 08 '16 at 13:57