Re: what would cause a symbol not to clear using Clear[name] or Remove[name]?

• To: mathgroup at smc.vnet.net
• Subject: [mg127219] Re: what would cause a symbol not to clear using Clear[name] or Remove[name]?
• From: Bob Hanlon <hanlonr357 at gmail.com>
• Date: Sun, 8 Jul 2012 22:46:44 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• Delivered-to: mathgroup-newout@smc.vnet.net
• Delivered-to: mathgroup-newsend@smc.vnet.net

```Here is an example of one way that can occur.

y starts off clear

??y

Global`y

\$Post is set to define y after any evaluation

(\$Post=(y=10;#)&);

Now, even clearing y will set it

Clear[y]

??y

Global`y

y=10

To stop this, \$Post must be cleared (or close the kernel)

\$Post=.

Clear[y]

??y

Global`y

Bob Hanlon

On Sun, Jul 8, 2012 at 7:05 PM, Nasser M. Abbasi <nma at 12000.org> wrote:
>
> Any experts here would explain why such a strange thing can happen?
>
> I do Clear[y] and then do ??y and it still shows the same expression as before.
>
> I also tried Remove[y], and it is still not clearing.
>
> --------------------------
> In[132]:= Clear[y]
>
> In[133]:= y
> Out[133]= 1/208694150 (0. -3.53899*10^6 x+63800. x^3+12500/3 (-7.5+x)^4 UnitStep[-7.5+x]-12500/3 (-0.9+x)^4 UnitStep[-0.9+x])
>
> In[134]:= Remove[y]
> In[135]:= y
> Out[135]= 1/208694150 (0. -3.53899*10^6 x+63800. x^3+12500/3 (-7.5+x)^4 UnitStep[-7.5+x]-12500/3 (-0.9+x)^4 UnitStep[-0.9+x])
>
> In[136]:= ??y
> Global`y
> y=(0. -3.53899*10^6 x+63800. x^3+12500/3 (-7.5+x)^4 UnitStep[-7.5+x]-12500/3 (-0.9+x)^4 UnitStep[-0.9+x])/208694150
>
> In[140]:= Clear["Global`*"]
> In[141]:= y
> Out[141]= beamDeflection[10,0.09,0.25,0.5,100000,0,29000000000,143927/20000000,1,x]
>
> In[142]:= Remove["Global`*"]
> In[143]:= y
> Out[143]= beamDeflection[10,0.09,0.25,0.5,100000,0,29000000000,143927/20000000,1,x]
> --------------------------------
>
> ?Remove
> removes symbols completely, so that their names are no longer recognized by Mathematica.
>
> In[139]:= \$Version[]
> Out[139]= 8.0 for Microsoft Windows (64-bit) (October 6, 2011)[]
>
> Here is a video of it in this folder, but it is 70 MB AVI file (in need
> to figure out how to reduce the size of an AVI file). This in
> case someone thinks I am making this up :)
>
> http://12000.org/tmp/070812/
>
> Only after I close the kernel, will this symbol finally clear up.
>
> In[2]:= y
> Out[2]= y
>
> Do you think this is strange? or is there a rational explanation to it?
> I have thought always that Clear[] will clear a symbol.
>
> thanks,
> --Nasser

```

• Prev by Date: Re: Framed plot provides an extra vertical line
• Next by Date: Re: what would cause a symbol not to clear using Clear[name] or Remove[name]?
• Previous by thread: Re: what would cause a symbol not to clear using Clear[name] or Remove[name]?
• Next by thread: Re: what would cause a symbol not to clear using Clear[name] or Remove[name]?