Reputation: 133
Why doesn't the following simple code reset K[r]?
In[1]:=$Context
K[r]=4r;
Clear["Global`*"];
K[r]
Out[1]=Global`
Out[4]=4r
If I use, say, A[r] or B[r] instead of K[r], they get cleared. Just not K[r].
Upvotes: 0
Views: 22
Reputation: 3977
It appears that there is something special about the symbol K
If you exit and restart Mathematica and then type
?K
followed by the Enter key then that returns
K is a default generic name for a summation index in a symbolic sum.
If you repeat exactly those steps with A or B that shows
Missing[UnknownSymbol, A]
Maybe that has something to do with what you are seeing, but I have not been able to find something in the documentation that exactly describes this.
This shows me again why I never name anything of mine beginning with a capital letter.
Upvotes: 2