This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Add-ons / Standard Packages / Appendix: How Mathematica Packages Are Set Up  /

Advanced Topic: Package File Names


The typical sequence of files looked for by <<name`.

To take advantage of loading packages using contexts, you should know how Get and related Mathematica functions translate names of the form name` into particular file names. <<name` first tries to load name.mx, the preferred name for a Mathematica expression dump. If there is no name.mx, <<name` tries to load name.m, the preferred name for a Mathematica source file or package. If there is no name.m, <<name` tries to load the file name/Kernel/init.m, the preferred name for a kernel initialization package for the directory name. If there is no name/Kernel/init.m, <<name` tries to load the file name/init.m, the default initialization package for the directory name.
The names of the source files for the standard packages have the .m extension, and you are encouraged to name your package source files using this extension as well.