external -- create a module
function environment
Introductionexternal("mstring", "fstring") returns the
function environment of the module function
mstring::fstring.
Call(s)external("mstring", "fstring")
Parameters"mstring" |
- | the name of a module: a character string |
"fstring" |
- | the name of a module function: a character string |
Returnsa function environment of type
DOM_FUNC_ENV.
Related
Functionsloadmod, module::new, unloadmod
Detailsexternal("mstring", "fstring") creates
and returns the function environment of the module function
mstring::fstring.mstring.mdg containing
MuPAD objects that are loaded and bound to the module function
environment. If an error occurs while loading these objects, a warning
is displayed. MuPAD keeps trying to load them at each subsequent
call of module functions affected by it.external, a module function can be accessed
without loading the module explicitly and without creating the module
domain. If such a module function is executed, its machine code is
loaded automatically if necessary.Some module functions may only work correctly if
their module domain was created before. Such modules must be loaded
with loadmod before any of their module functions are
executed. Refer to the documentation of the corresponding module.
external is a function of the system kernel.
Example
1Module function environments can be stored in local or global variables. They can be used to execute module functions without loading the module explicitly:
>> where := external("stdmod", "which"): where("stdmod")
"/usr/local/mupad/linux/modules/stdmod.mdm"
>> delete where:
Backgroundexternal, loadmod and unloadmod provide basic features
for accessing modules. Extended features are available with the
module library.