This question already has an answer here:
I open a new notebook and type
ClearAll[test]; test[x_] := x + 42;
I save it as
Temp.nb and also as
Temp.m, using the menu Save As... > Wolfram Mathematica Package (*.m). I now open up another notebook and type
which succeeds. But the symbol
test is not defined.
Information::notfound: Symbol test not found. >>
I'm confused, because the documentation for
<< name reads in a file, evaluating each expression in it and returning the last one.
It should have evaluated the expressions in
Temp.m, then, I should think, and returned the [value of] the last one, which would be
Null. One of those expressions is a
SetDelayed for the symbol
test and should have installed
test in the Global namespace, no?
Fresh kernel session, fresh reboot of MMA, also fails if file is saved as Wolfram Language Package (*.wl), yada yada.