DOCUMENTATION CENTER SEARCH
Mathematica
>
Assignments
>
Built-in
Mathematica
Symbol
Defining Variables
Defining Functions
Making Definitions
Manipulating Symbols and Contexts by Name
Memory Management
Tutorials »
|
ClearAll
Unset
TagUnset
ClearAttributes
Remove
See Also »
|
Assignments
Memory Measurement & Optimization
Symbol Handling
Tuning & Debugging
Defining Variables and Functions
More About »
Clear
Clear
[
symbol
1
,
symbol
2
,
...
]
clears values and definitions for the
symbol
i
.
Clear
["
form
1
", "
form
2
",
...
]
clears values and definitions for all symbols whose names match any of the string patterns
form
i
.
MORE INFORMATION
Clear
does not clear attributes, messages, or defaults associated with symbols.
Clear
allows abbreviated string patterns containing the following metacharacters:
*
zero or more characters
@
one or more characters, excluding upper-case letters
\\*, etc.
literal *, etc.
Clear
["
context
`*"]
clears all symbols in a particular context.
Clear
is
HoldAll
.
Clear
does not affect symbols with the attribute
Protected
.
EXAMPLES
CLOSE ALL
Basic Examples
(2)
Clear a variable:
In[1]:=
In[2]:=
Clear a function definition:
In[1]:=
In[2]:=
Scope
(4)
Generalizations & Extensions
(2)
Applications
(1)
Properties & Relations
(2)
Possible Issues
(1)
Neat Examples
(1)
SEE ALSO
ClearAll
Unset
TagUnset
ClearAttributes
Remove
TUTORIALS
Defining Variables
Defining Functions
Making Definitions
Manipulating Symbols and Contexts by Name
Memory Management
MORE ABOUT
Assignments
Memory Measurement & Optimization
Symbol Handling
Tuning & Debugging
Defining Variables and Functions
New in 1
© 2008 Wolfram Research, Inc.