MathGroup Archive 2006

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

Search the Archive

Re: Seemingly strange behavior - HoldForm and Evaluate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg68127] Re: Seemingly strange behavior - HoldForm and Evaluate
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Tue, 25 Jul 2006 04:01:26 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <ea1nqf$pns$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

because Plus[]  has no HoldAll attribute that can
be removed .... and Evaluate[] does nothing
if its not directly wrapped around a
a argument of a function that does not evaluate
this arguments.

Regards
  Jens

"Bharat Bhole" <bbhole at gmail.com> schrieb im 
Newsbeitrag news:ea1nqf$pns$1 at smc.vnet.net...
|I came across this when answering one of the 
queries posted on this forum.
|
| If I write
|
| (1)
| In: a = 2;
|     HoldForm[a]
|
| Out: a
|
| (2)
| In: a=2;
|     HoldForm[Evaluate[a]]
|
| Out: 2
|
| (3) In: a=2;
|         b=3;
|         HoldForm[Evaluate[a] + Evaluate[b]]
|
| Out: Evaluate[a] + Evaluate[b]
|
|
|
| Example 2 seems to suggest that Evaluate works 
as expected, i.e., it
| evaluates the expression assigns value 2 despite 
the HoldAll attribute of
| HoldForm. However, in example 3, evaluate does 
not function as expected, or
| may it does, but I do not understand why a and b 
are not assigned there
| values.
|
| Thanks,
| Bharat.
|
| 



  • Prev by Date: Tick mark function
  • Next by Date: Using methods from packages
  • Previous by thread: RE: Seemingly strange behavior - HoldForm and Evaluate
  • Next by thread: simple antiderivative