Clear
Usage
• Clear[ , , ... ] 清除  的值和定义.
• Clear[" ", " ", ... ] 清除所有的其名字匹配任何字符串模式  的符号的值和定义.
Notes
• Clear 并不清除与符号关联的属性,信息或缺省设置. • Clear["form"]允许在节A.3.13中指定的诸如*的通配符. • Clear["context`*"]清除在特殊上下文中的所有符号. • Clear 具有属性 HoldAll. • Clear 并不对有属性Protected的符号发生影响.
Further Examples
Various rules and values are associated with h1.
In[1]:=
|
In[2]:=
|
Out[2]=
|
In[3]:=
|
Here are the rules in action.
In[4]:=
|
Out[4]=
|
Clear gets rid of values and definitions from h1.
In[5]:=
|
The Listable attribute is left alone by Clear.
To get rid of values alone use Unset; to get rid of everything use ClearAll; to get rid of everything including the symbol h1 itself use Remove.
In[6]:=
|
Out[6]=
|
|