@Carl Love Great. I'm writing packages (i.e. modules with
option package). I need to access procedures defined and exported by an "inner" package. After some trial and error, here's what works:
1. Inside an outerModule, define several "sub-modules", say, innerModule1, innerModule2, innerModule3.
2. Export some procedures in each sub-module.
3. Inside outerModule, add
4. In the main program, add
Now I can call the procedures exported by the inner modules. Unfortunately this gets very verbose when there are many inner modules. It would be really helpful if Maple supported "nested export", allowing procedures exported by inner modules to be further exported by the outer module. Incidentally, in a different programming language Julia, you can do it like this:
add_three(x) = x + 3 # Julia notation for defining a function, i.e. procedure in Maple
using .InnerModule1 # Similar to Maple's "with". Brings `add_three` into the namespace
export add_three # Export it from OuterModule too
using OuterModule # Now I can call the function add_three, made available via nested export.