Mathematica 9 is now available

EndPackage

Usage

EndPackage[ ]$Context$ContextPath 还原成先前的BeginPackage之前的值,并把当前上下文放到列表$ContextPath中.


Notes

EndPackage 的每一次调用必须提前使用BeginPackage调用来平衡.
EndPackage通常被用在一个Mathematica包的末尾.
EndPackage返回Null.
EndPackage 会重新设置$Context$ContextPath的值.
• 参见 Mathematica全书: 2.6.10节.
Further Examples

Nested BeginPackages and EndPackages behave properly. Here we have two nested context changes.

In[1]:=  

Out[1]=

The first EndPackage restores the context that was current before the last BeginPackage.

In[2]:=  

Out[2]=

Another EndPackage restores the original context.

In[3]:=  

Out[3]=

同时参见 the Further Examples for BeginPackage.



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.