Use library functions by a short name
This functionality does not run in MATLAB.
f1, f2, …) use(
use(L, f) 'exports' the public function
L to the global namespace such that
it can be accessed as
f without the prefix
use(L) exports all public functions of the
A library contains public functions which
may be called by the user. The collection of these functions forms
the interface of the library. (There may be other,
private, functions, too, which are not intended to be called by the
user directly, and are not documented.) The standard way of accessing
the public function
f from the library
L::f. When the function
f is exported,
it can be accessed more briefly as
exporting means that the global identifier
assigned the value
L::f. Alternatively, when the
Alias is used, an
alias is created.
Unexporting the library function
that the value of the global identifier
f is deleted.
Afterwards, the library function is available only as
use(L, f1, f2, ...) exports the given functions
f2, ... of
L. However, if one of the
identifiers already has a value, the corresponding function is not
exported. A warning is printed instead. An error is returned if one
of the identifiers is not the name of a public library function.
use(L) exports all public functions of
A function that is already exported will not be exported twice.
use evaluates its first argument
but it does not evaluate the remaining arguments
..., if any.
the interface functions and the exported functions of a library.
Some libraries have functions that are always exported. These
functions cannot be unexported. The function
append from the library
such an example.
When a function is exported, it is assigned to the corresponding global identifier. When it is unexported, the corresponding identifier is deleted.
Export the function
invphi of the library numlib,
and then undo the export:
Export all functions of the library numlib:
Warning: Identifier 'divisors' already has a value. It is not exported. [use]
Warning: Identifier 'contfrac' already has a value. It is not exported. [use]
use issues warnings because
already available as global functions. For example, there is the global
contfrac function that
numerical arguments. Undo the export of the
use issues a warning if a function cannot
be exported since the corresponding identifier already has a value:
invphi := 17: use(numlib, invphi)
Warning: Identifier 'invphi' already has a value. It is not exported. [use]
null() of type
The names of the public functions of a library
stored in the set
L::interface. This set is used
by the function
The names of functions exported from a library
stored in the set