## `module::func` -- creates a module function environment

#### Introduction

`module::func``(name,fname)` creates a function environment.

#### Call(s)

`module::func(name <, fname>)`

#### Parameters

`name` | - | module name: character string, identifier or module domain
`fname` | - | function name: character string or identifier

#### Returns

a function environment function environment of type `DOM_FUNC_ENV`.

#### Related Functions

`external`, `loadmod`, `module::new`, `unloadmod`

#### Details

- In some cases it is not necessary to access a whole module but one only wants to call a specific module function. This can be done by creating a module function environment and assigning it to a variable. With this neither the module machine code is loaded nor the module domain will be created. The corresponding machine code is loaded on demand when this module function is executed.
- `module(name,fname)` is an abbreviation for `module::``module::func``(name,fname)`.
- `module::func``(name,fname)` uses the kernel function `external` to create a module function environment.

#### Example 1

Module function environments can be stored in local or global variables and be used to execute module functions without loading the module explicitly.

    >> where := module::func("stdmod","which"):
       where("stdmod")

          "/usr/local/mupad/linux/modules/stdmod.mdm"

#### Background

- More detailed information are available with the kernel functions `loadmod`, `unloadmod` and `external`.

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000