Mathematica 9 is now available

Documentation / Mathematica / Built-in Functions / Programming / Scoping /

Needs

FilledSmallSquare Needs["context`"] loads an appropriate file if the specified context is not already in $Packages.

FilledSmallSquare Needs["context`", "file"] loads file if the specified context is not already in $Packages.

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

FilledSmallSquare Example: Needs["Collatz`"] typically reads in a file named Collatz.m.

FilledSmallSquare See Section 2.7.10.

FilledSmallSquare See also: Get, DeclarePackage, FileNames.

FilledSmallSquare Related package: Utilities`Package`.

FilledSmallSquare New in Version 1.

Further Examples



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.