## Synopsis

• Usage:
• Inputs:
• PackageName, , the name of the package, or a Package object
• Optional inputs:
• FileName => , default value null, the name of the file containing the source code of the package, from which it should be loaded
• LoadDocumentation => , default value false, whether to load the documentation of the package, too; see beginDocumentation
• DebuggingMode => , default value null, the value of debuggingMode during loading the package; specifying it here overrides the value specified as an option to newPackage by the package itself; however, if debuggingMode is already false it will remain so.
• Configuration => a list, default value {}, the entries are options KEY => VALUE overriding the defaults specified in the source code of the package and the (possibly updated) values in the file in the user's application directory.
• Reload => , default value null, whether to reload the package, if it has been loaded before. If the input was an already loaded Package, this is automatically set to true.
• Outputs:
• , the package just loaded; if the input was an already loaded Package, this is the reloaded package
• Consequences:
• Loads (or reloads) the package PackageName that is in the file PackageName.m2.

## Description

The file PackageName.m2 should be on the load path and should contain a package named PackageName.

If the variable notify is set to true, then an informational message is displayed after the file is loaded.

 i1 : notify = true o1 = true i2 : loadPackage "FirstPackage" -- loading FirstPackage.m2 -- opening database /usr/lib/Macaulay2/FirstPackage/cache/rawdocumentation-dcba-8.db -- beginDocumentation: using documentation database, skipping the rest of /usr/share/Macaulay2/FirstPackage.m2 -- package "FirstPackage" loaded -- loaded /usr/share/Macaulay2/FirstPackage.m2 o2 = FirstPackage o2 : Package

If the input is a loaded package, then this command will reload the package instead:

 i3 : loadPackage FirstPackage -- closing database /usr/lib/Macaulay2/FirstPackage/cache/rawdocumentation-dcba-8.db -- loading FirstPackage.m2 -- opening database /usr/lib/Macaulay2/FirstPackage/cache/rawdocumentation-dcba-8.db -- beginDocumentation: using documentation database, skipping the rest of /usr/share/Macaulay2/FirstPackage.m2 -- package "FirstPackage" loaded -- loaded /usr/share/Macaulay2/FirstPackage.m2 o3 = FirstPackage o3 : Package

In fact this version of the command is simply a convenient shortcut for loadPackage with the option Reload overridden to true.