Question: How to use LibraryTools[Save]?

Hi,

I want to put some code into a Maple library. I'm new to producing packages. The following code runs OK, but when I try to use one of the procedures added by the LibraryTools[Save] command, Maple returns

input: MySum(a, b);
output: MyMapleLibrary:-MySum(a, b)

Why does Maple return an unevaluated call to MySum?

The code is below:

restart:
with(LibraryTools):

MyMapleLibrary:=module()
  description "A sample Maple library.":
  export MyPower, MySum:
  option package:
end module:

libraryFilename:="C://Personal//MyMapleLibrary//MyMapleLibrary.mla":
savelib(MyMapleLibrary, libraryFilename);

MyPower:=proc(a, b)
  description "Returns the power of a to b.":
  return a^b:
end proc:

MySum:=proc(a, b)
  description "Returns the sum of a and b.":
  return a + b:
end proc:

LibraryTools[Save]('MyPower', 'MySum', libraryFilename);

restart:
libraryFilename:="C://Personal//MyMapleLibrary//MyMapleLibrary.mla":
march(open, libraryFilename):
with(MyMapleLibrary);
with(LibraryTools):

      "C:\Program Files\Maple 14/lib",

        "C:\Program Files\Maple 14\toolbox\NAG\lib",

        "C://Personal//MyMapleLibrary//MyMapleLibrary.mla"
                        [MyPower, MySum]
LibraryTools[ShowContents](libraryFilename);

[["MyMapleLibrary.m", [2012, 10, 9, 11, 28, 39], 304128, 152],

  ["MyPower.m", [2012, 10, 9, 11, 28, 41], 304394, 79],

  ["MySum.m", [2012, 10, 9, 11, 28, 41], 304473, 82]]
MySum(a, b);

                  MyMapleLibrary:-MySum(a, b)

I know I'm doing something wrong, but don't know what it is. Any help is greatly appreciated!

Carlos Mallen

Please Wait...