This is documentation for Mathematica 7, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

$ContextPath

$ContextPath
is a global variable that gives a list of contexts, after $Context, to search in trying to find a symbol that has been entered.
  • Each context is specified by a string of the form "name`".
  • The elements of $ContextPath are tested in order to try to find a context containing a particular symbol.
  • $ContextPath is a rough analog for Mathematica symbols of the "search path" for files in many operating systems.
The default contexts for looking up symbols:
If a symbol with a given name cannot be found in one of these contexts a new one is created:
It is created in the context given by $Context:
Turn off the message for new symbol creation:
The default contexts for looking up symbols:
In[1]:=
Click for copyable input
Out[1]=
If a symbol with a given name cannot be found in one of these contexts a new one is created:
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=
It is created in the context given by $Context:
In[4]:=
Click for copyable input
Out[4]=
Turn off the message for new symbol creation:
In[5]:=
Click for copyable input
Add Developer` context to the context path:
PackedArrayForm is a command in the Developer` context that can now be used directly:
New in 1