# How to load a package [duplicate]

I have a package:

BeginPackage["HNotation"];

soma::usage = "asdfa";

Begin["Private"];

soma[x_] := x + 1;

End[];

EndPackage[];


I save the file with ".m" extension. So, in another file I tried to load the package:

In[2]:= Get["MPA_HNotation.m", Path -> {"/home/mateus/Desktop/"}]

In[3]:= soma[x]

Out[3]= soma[x]


It seems that doesn't get the package. What can be wrong?

## marked as duplicate by Szabolcs, Kuba♦Jan 28 at 14:38

• Works fine for me, maybe there are old definitions of soma that interfere. Get would issue a message if it didn't find the file. What if you restart the kernel. What does ?soma` say? – Kuba Jan 24 at 21:24