Mathematica 9 is now available
 Documentation / Mathematica / The Mathematica Book / Reference Guide / Basic Objects  /

A.1.3 Contexts

The full name of any symbol in Mathematica consists of two parts: a context, and a short name. The full name is written in the form context`name. The context context` can contain the same characters as the short name. It may also contain any number of context mark characters `, and must end with a context mark.
At any point in a Mathematica session, there is a current context$Context and a context search path$ContextPath consisting of a list of contexts. Symbols in the current context, or in contexts on the context search path can be specified by giving only their short names.


Contexts used for various specifications of symbols.

With Mathematica packages, it is conventional to associate contexts whose names correspond to the names of the packages. Packages typically use BeginPackage and EndPackage to define objects in the appropriate context, and to add the context to the global $ContextPath. EndPackage prints a warning about any symbols that were created in a package but which are "shadowed" by existing symbols on the context search path.
The context is included in the printed form of a symbol only if it would be needed to specify the symbol at the time of printing.



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.