Off[General::"spell1", General::"spell"]

Define Library File

Let's write a simple function here

MyFunSimple[x_, y_] := Sin[x + y];

Now let's write a complex function which uses this function.

Comments for MyFunComplex function

\(MyFunComplex[x_, y_] := 
      Module[{u}, 
u = 
          MyFunSimple[x, y]; 
If[
          u == 
            0, 
Print["Sin(x+y)=0"], 
Print["Sin(x+y)!=0"]
];
]\)

Comments for AnotherMyFunComplex function

AnotherMyFunComplex[x_] := 
      Module[{u}, 
u = x + 3; 
Sin[
          u]
]

Create the Header File

Set the directory to the appropriate place where the header file is to be saved

SetDirectory["D:\chris_lum_D\mathematica\module_tutorial"];

Now place these functions in the actual header file (use the Put[1,"..."] to clear the file first and place a harmless 1 in the beginning of the file)

Put[1, "moduleH.nbd"]

Now save the functions

Save["moduleH.nbd", {MyFunComplex, AnotherMyFunComplex}]