Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » packages » use(Package)
next | previous | forward | backward | up | index | toc

# use(Package) -- activate a previously dismissed package

- Function: use
- Usage:
    `use PACKAGENAME`
- Inputs:
  - PACKAGENAME, a package, which was previously loaded, and then dismissed.
- Consequences:
  - activates the package, making all of its exported symbols visible
  - runs the function stored under the key
  - symbol use
  - in the package, if there is one

## Description

This function is only necessary after dismissing a package.

    i1 : loadPackage "FirstPackage"

    o1 = FirstPackage

    o1 : Package

    i2 : firstFunction

    o2 = firstFunction

    o2 : MethodFunction

    i3 : dismiss FirstPackage

    o3 = FirstPackage

    o3 : Package

    i4 : firstFunction

    o4 = firstFunction

    o4 : Symbol

    i5 : use FirstPackage

    o5 = FirstPackage

    o5 : Package

    i6 : firstFunction

    o6 = firstFunction

    o6 : MethodFunction

## See also

- loadPackage -- load a package
- dismiss(Package) -- dismiss a package
- FirstPackage -- an example Macaulay2 package

## Ways to use this method:

- use(Package) -- activate a previously dismissed package

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/functions/use-doc.m2:35:0.