MathGroup Archive 2010

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110938] Why Evaluate[Defer[1+1]] does not return 2 ?
  • From: "Nasser M. Abbasi" <nma at 12000.org>
  • Date: Mon, 12 Jul 2010 07:22:11 -0400 (EDT)
  • Reply-to: nma at 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





  • Prev by Date: Re: Simplest way to get 2 digits from an integer...
  • Next by Date: Re: Simple Question
  • Previous by thread: strange bahavior of ArcSinh
  • Next by thread: Re: Why Evaluate[Defer[1+1]] does not return 2 ?