MathGroup Archive 1999

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

Search the Archive

Deleting a DownValue, Evaluate[f@@argList]=. does not do it

  • To: mathgroup at smc.vnet.net
  • Subject: [mg20744] Deleting a DownValue, Evaluate[f@@argList]=. does not do it
  • From: hanssen at zeiss.de
  • Date: Wed, 10 Nov 1999 00:17:53 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

Hi, MathGroup,

f[1]=1;
f[2]=2;
?f

yields

"Global`f"
f[1] = 1
f[2] = 2

now get rid of definition for 1

f[1]=.;
?f

yields

"Global`f"
f[2] = 2


So far, it works as expected. I want to memorize results for combinations of arguments
like f[a,b,c]=results and so on. To do this, I write f@@argList. Now I demonstrate
this on lists with length 1, to make it simple. When making the assignment, it has to be 
wrapped in Evaluate:

Clear[f];
Evaluate[f@@{1}]=1;
Evaluate[f@@{2}]=2;
?f

yields

"Global`f"
f[1] = 1
f[2] = 2

as before. Now I want to get rid of the definition for 1 in the analogous way:

Evaluate[f@@{1}]=.

yields

Unset::usraw: Cannot unset raw object !
$Failed

How to proceed without searching through DownValues[f] and deleting
the one meant - very awkward?

kind regards

Dipl.-Math. Adalbert Hanszen


  • Prev by Date: Integrate (undocumented feature)
  • Next by Date: Graphics output
  • Previous by thread: RE: Integrate (undocumented feature)
  • Next by thread: Re: Deleting a DownValue, Evaluate[f@@argList]=. does not do it