End

End[]

returns the present context, and reverts to the previous one.

Details

  • Every call to End must be balanced by an earlier call to Begin.
  • End[] resets the value of $Context.
  • End[] returns the present context name as a string of the form "context`".
  • End[] does not modify $ContextPath.

Examples

Basic Examples  (1)

Define a function f in the MyContext` Context:

Restore the context:

The context is now what it was before Begin was used:

Introduced in 1988
 (1.0)