Extern functions compiled in dynamic libraries are usually loaded automatically when LME starts up. In some applications, for instance when the creation of the library is made dynamically from LME, the functions it implements should be made available on demand. The functions described below support this.
Evaluate a function defined in an extern library loaded on demand.
(argout1, ...) = exteval(id, funname, argin1, ...)
exteval(id,funname,argin1,...) evaluates the function whose name is given by string funname in a library loaded with extload and identified by id. Remaining input arguments, if any, are given to the function as input arguments. The function output arguments are given back by exteval.
Load an extern library.
id = extload(path)
extload(path) loads an extern library whose path is given by string path. It returns an identifier (a scalar integer) which must be used with exteval to evaluate a function defined in the library and with extunload to unload the library.
Libraries loaded with extload are fully compatible with libraries which are loaded automatically at startup. They are described in the chapter about Extern code.
Unload an extern library.
extunload(id)
extunload(id) unloads a library loaded with extload and identified by id. The ShutdownFn defined in the library, if any, is executed.