Needs

Needs["context`"]

loads an appropriate file if the specified context is not already in $Packages.

Needs["context`","file"]

loads file if the specified context is not already in $Packages.

Details

  • Needs["context`"] calls Get["context`"]. By convention, the file loaded in this way is the one that contains a package that defines context`.
  • Needs["file`"] typically reads in a file named .

Examples

open allclose all

Basic Examples  (1)

Read in the file for the Computer Arithmetic Package if it has not already been read:

In[1]:=
Click for copyable input

The commands defined by the package are ready for use:

In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=

Properties & Relations  (1)

See Also

Get  DeclarePackage  FileNames  Once  $InitializationContexts

Tutorials

Introduced in 1988
(1.0)