From: Nasser M. Abbasi on 12 Jul 2010 07:22 I am a little confused about Defer: r = Defer[1 + 1] Out[106]= 1 + 1 Evaluate[r] Out[109]= 1 + 1 But help says: "Defer[expr] returns an object which remains unchanged until it is explicitly supplied as Mathematica input, and evaluated using Shift+Enter, Evaluate in Place, etc. " Isn't typing Evaluate[r] the same as Evaluate in Place mentioned above? ?Evaluate "Evaluate[expr] causes expr to be evaluated even if it appears as the argument of a function whose attributes specify that it should be held unevaluated." Isn't "r" above is the object in question whose value is 1+1? Actually, typing "r" itself, (same as typing Evaluate[r]) does return "1+1". In[117]:= r Out[117]= 1 + 1 I think I know what is the problem now, I am going by that "r" is the expression whose value is "1+1". I think this is the problem. "r" is not the expression, it is "1+1" which is the expression. "r" is just another name for Defer[1+1]. Am i getting close? --Nasser
From: David Park on 13 Jul 2010 05:26 I think that Defer is intended for something like the following: {PasteButton[1 + 1], PasteButton[Defer[1 + 1]]} Evaluate, use the second button, and then evaluate the pasted result. David Park djmpark(a)comcast.net http://home.comcast.net/~djmpark/ From: Nasser M. Abbasi [mailto:nma(a)12000.org] I am a little confused about Defer: r = Defer[1 + 1] Out[106]= 1 + 1 Evaluate[r] Out[109]= 1 + 1 But help says: "Defer[expr] returns an object which remains unchanged until it is explicitly supplied as Mathematica input, and evaluated using Shift+Enter, Evaluate in Place, etc. " Isn't typing Evaluate[r] the same as Evaluate in Place mentioned above? ?Evaluate "Evaluate[expr] causes expr to be evaluated even if it appears as the argument of a function whose attributes specify that it should be held unevaluated." Isn't "r" above is the object in question whose value is 1+1? Actually, typing "r" itself, (same as typing Evaluate[r]) does return "1+1". In[117]:= r Out[117]= 1 + 1 I think I know what is the problem now, I am going by that "r" is the expression whose value is "1+1". I think this is the problem. "r" is not the expression, it is "1+1" which is the expression. "r" is just another name for Defer[1+1]. Am i getting close? --Nasser
|
Pages: 1 Prev: Stem and Leaf Question Next: Restricting file type with SystemDialogInput |