Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > Package Development > DeclarePackage >

DeclarePackage

DeclarePackage
declares that Needs 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.
Use of the symbol implies reading the corresponding package automatically:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Use of the symbol implies reading the corresponding package automatically:
In[3]:=
Click for copyable input
Out[3]=
The named context is prepended to the search path:
New in 2
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF