Skip to main content

functions - Remove versus ClearAll


What is the difference between Remove and ClearAll?


I thought that "not being recognized by Mathematica", which is the effect of Remove, meant that there would be no "values, definitions, attributes, messages, and defaults associated with symbols", which is the effect of ClearAll. That naive equivalence is wrong as shown by the different output out of these two lines:


b := a; Remove[a]; b
b := a; ClearAll[a]; b

Which side effects of Remove are not shared by ClearAll (and viceversa)?




Comments