Search for all pages containing Needs


Needs
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["context`"] automatically adds "context`" to $ContextPath, making all symbols in "context`" available without qualification.
- Needs["context`""alias`"] adds "alias`""context`" to $ContextAliases, providing the ability to use a shorter or easier to type alias to access symbols in that context. Contexts loaded with this form are not added to $ContextPath.
- Needs["context`"None] makes no modifications to $ContextPath or $ContextAliases.
- Needs["file`"] typically reads in a file named
.
Examples
open all close allBasic Examples (2)
Read in the file for the Computer Arithmetic Package if it has not already been read:
The commands defined by the package are ready for use:
Read in the Computer Arithmetic package with the alias ca`:
Symbols can be accessed using the context alias:
Symbols can also be accessed using the original context name:
Scope (1)
Read in the Computer Arithmetic package without adding it to the context path:
Using the function Ulp with the context fails:
Properties & Relations (3)
The form Needs["context`""alias`"] modifies $ContextAliases:
The form Needs["context`"] modifies $ContextPath:
Once[Get[package]] is similar to Needs[package]:
See Also
Get DeclarePackage $ContextPath $ContextAliases FileNames Once $InitializationContexts
Function Repository: NeedsDefinitions
Tech Notes
Related Workflows
- Load a Package
History
Introduced in 1988 (1.0) | Updated in 2021 (13.0)
Text
Wolfram Research (1988), Needs, Wolfram Language function, https://reference.wolfram.com/language/ref/Needs.html (updated 2021).
CMS
Wolfram Language. 1988. "Needs." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/Needs.html.
APA
Wolfram Language. (1988). Needs. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Needs.html
BibTeX
@misc{reference.wolfram_2025_needs, author="Wolfram Research", title="{Needs}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/Needs.html}", note=[Accessed: 05-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_needs, organization={Wolfram Research}, title={Needs}, year={2021}, url={https://reference.wolfram.com/language/ref/Needs.html}, note=[Accessed: 05-August-2025]}