MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Why Evaluate[Defer[1+1]] does not return 2 ?

  • To: mathgroup at
  • Subject: [mg110942] Re: Why Evaluate[Defer[1+1]] does not return 2 ?
  • From: "David Park" <djmpark at>
  • Date: Tue, 13 Jul 2010 05:26:15 -0400 (EDT)

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 at  

From: Nasser M. Abbasi [mailto:nma at] 

I am a little confused about Defer:

r = Defer[1 + 1]
Out[106]= 1 + 1

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?


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 

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?


  • Prev by Date: Re: Simplest way to get 2 digits from an integer...
  • Next by Date: Re: Fast pricer for American options
  • Previous by thread: Why Evaluate[Defer[1+1]] does not return 2 ?
  • Next by thread: Restricting file type with SystemDialogInput