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

Begin

Begin
resets the current context.
  • The interpretation of symbol names depends on context. Begin thus affects the parsing of input expressions.
Define a function in the Context:
Restore the context:
will generally be hidden in the restored context:
The definitions are all in :
The function can be called using its fully qualified name:
Define a function in the Context:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Restore the context:
In[3]:=
Click for copyable input
Out[3]=
will generally be hidden in the restored context:
The definitions are all in :
The function can be called using its fully qualified name:
In[6]:=
Click for copyable input
Out[6]=
Make symbols used for package function definitions private, reducing the possibility for conflict:
Any use of the symbol in the package context ensures that is created in that context:
When the context given to Begin starts with it extends from the current context:
Since the symbol is in the package context, the function works after EndPackage:
You can see that the other variable uses the private context:
New in 1