Previous Page Next Page Contents

loadmod -- load a module

Introduction

loadmod("modulename") loads the dynamic module named modulename.

loadmod() checks whether the MuPAD kernel supports dynamic modules.

Call(s)

loadmod("modulename")
loadmod()

Parameters

"modulename" - the name of a module: a character string

Returns

loadmod() returns TRUE or FALSE; loadmod("modulename") returns a module domain of type DOM_DOMAIN.

Side Effects

loadmod("modulename") assigns a value to the identifier modulename. E.g., after loadmod(ßtdmod"), the identifier stdmod has the loaded module as its value.

Further Documentation

Dynamic Modules - User's Manual and Programming Guide for MuPAD 1.4, Andreas Sorgatz, Oct 1998, Springer Verlag, Heidelberg, with CD-ROM, ISBN 3-540-65043-1.

Related Functions

external, export, module::new, package, unloadmod

Details

Example 1

The following call loads the dynamic module stdmod:

>> loadmod("stdmod")
                                  stdmod
>> type(stdmod);
                                DOM_DOMAIN

Since modules are represented as domains, they can be used in the same way as library packages or other MuPAD domains. E.g., a module function is called with the prefix modulename:

>> stdmod::which("stdmod")
      "/usr/local/mupad/linux/modules/stdmod.mdm"     

As for libraries, info can also be used to get information about a loaded module:

>> info(stdmod)
      Module: 'stdmod' created on 28.Sep.00 by mmg R-2.0.0
      Module: Extended Module Management
      
      -- Interface:
      stdmod::age,  stdmod::doc,   stdmod::help, stdmod::max,
      stdmod::stat, stdmod::which

The function export exports all public functions of the module. After this, the method "which" can be called without the domain prefix stdmod:

>> export(stdmod): which("stdmod")
      "/usr/local/mupad/linux/modules/stdmod.mdm"

Example 2

Documentation of a dynamic module named modulename may be provided by a plain text file ``modulename.mdh'' which must be located in the same directory as the module file ``modulename.mdm''. Such documentation can be accessed as demonstrated below. Cf. module::help for details.

>> stdmod::doc()
      MODULE
        stdmod - Extended Module Management
      
      INTRODUCTION
        This module provides functions for an extended module ...
      
      INTERFACE
        age, doc, help, max, stat, which             

Above, the introductory page of the module documentation was displayed. Below, using the argument "doc", the help page of the function stdmod::doc is shown:

>> stdmod::doc("doc")
      NAME
        stdmod::doc - Display online documentation
      
      SYNOPSIS
        ...
      
      SEE ALSO
        info, module::help    

Background

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000