As an introduction to packages in Mathematica I'm following this short guide by Leonid Shifrin, and tried using the sample package provided in that answer. However, both
Get seem to fail loading the package.
Needs I get the error
Needs::nocont: "Context SimpleArithmetic` was not created when Needs was evaluated.
Get I don't get any error, but the package is still not loaded.
Here is what I did (I'm using M10.1 with Windows 7, if that is not obvious from the screenshots :) ):
- Copy-pasted the code in the answer linked above in a new notebook, saved the notebook with .m extension inside the
- Opened a fresh Mathematica session and used
Needsto load the package:
As you can see something is going wrong. What am I missing?