Mathematica 9 is now available
 Documentation / Mathematica / Built-in Functions / Programming / Scoping  /
DeclarePackage

  • DeclarePackage[" context `", " ", " ", ... ] declares that Needs[" context `"] should automatically be executed if a symbol with any of the specified names is ever used.
  • You can use DeclarePackage to tell Mathematica automatically to load a particular package when any of the symbols defined in it are used.
  • DeclarePackage creates symbols with the attribute Stub in the specified context.
  • DeclarePackage prepends context ` to $ContextPath.
  • See the Mathematica book: Section 2.6.11.
  • See also: Needs, $NewSymbol.


    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.