resets the current context.


  • Begin resets the value of $Context.
  • The interpretation of symbol names depends on context. Begin thus affects the parsing of input expressions.


open allclose all

Basic Examples  (1)

Define a function f in the MyContext` Context:

Restore the context:

f will generally be hidden in the restored context:

The definitions are all in MyContext`f :

The function can be called using its fully qualified name:

Applications  (1)

Make symbols used for package function definitions private, reducing the possibility for conflict:

Any use of the symbol f in the package context ensures that f is created in that context:

When the context given to Begin starts with ` it extends from the current context:

Since the symbol f is in the package context, the function works after EndPackage:

You can see that the other variable uses the private context:

Wolfram Research (1988), Begin, Wolfram Language function,


Wolfram Research (1988), Begin, Wolfram Language function,


@misc{reference.wolfram_2021_begin, author="Wolfram Research", title="{Begin}", year="1988", howpublished="\url{}", note=[Accessed: 13-June-2021 ]}


@online{reference.wolfram_2021_begin, organization={Wolfram Research}, title={Begin}, year={1988}, url={}, note=[Accessed: 13-June-2021 ]}


Wolfram Language. 1988. "Begin." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (1988). Begin. Wolfram Language & System Documentation Center. Retrieved from