This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Built-in Functions / Programming / Scoping  /
Contexts

  • Contexts[ ] gives a list of all contexts.
  • Contexts[" string "] gives a list of the contexts which match the string.
  • The string can contain metacharacters such as * and @, as described in Section¬†A.3.13.
  • See the Mathematica book: Section 2.6.8,¬†Section 2.6.12.
  • See also: $Packages, $ContextPath.

    Further Examples

    Here is a list of all the contexts in the current session.

    In[1]:=

    Out[1]=

    This gives a list of the subcontexts of the System context.

    In[2]:=

    Out[2]=