I am reading "Mathematics and Algorithms" as part of the Wolfram Tutorial series.
In "Values for symbols" section of the "Algebraic Calculations" chapter it is described that =.
can be used to clear the contents of a variable.
I am struggling to be able to understand in which cases this is applicable.
For example, I have a notebook which I have been using for several tests and specifically I can not clear the value of x.
In[] x
Out[] Removed[t]
In[] x=.
Out[]
In[] x
Out[] Removed[t]
Why x
is not being cleared?
Quit[]
to get a fresh kernel, then usex=t;Remove[t];x
I getRemoved[t]
like you, but thenx=.;x
givesx
so the variable is cleared as expected. Example 2: If IQuit[]
to get a fresh kernel, then usex=t;x/:Unset[x]=Null;Remove[t];
then afterwards I see the same behavior as you. Example 2 is contrived, and just to illustrate that this behavior is possible, but I wonder what you did. $\endgroup$Quit[]
I get a fresh kernel. If I ever identify what is generating this issue I will repost the path that lead to this behaviour. My expectation was that=.
shall clear the symbol/variable always. $\endgroup$ClearAll[x]
instead. $\endgroup$