$Context

$Context

is a global variable that gives the current context.

Details

  • Contexts are specified by strings of the form "name`".
  • $Context is modified by Begin, BeginPackage, End, and EndPackage.
  • $Context is a rough analog for Wolfram Language symbols of the current working directory for files in many operating systems.

Examples

Basic Examples  (1)

Give the current context. The default is "Global`":

In[1]:=
Click for copyable input
Out[1]=

New symbols created will have this context by default:

In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=

See Also

Context  $ContextPath  CellContext

Tutorials

Introduced in 1988
(1.0)