info -- prints short
information
Introductioninfo(object) prints short information
about object.
info() prints a list of all available
MuPAD libraries.
Call(s)info(object)
info()
Parametersobject |
- | any MuPAD object |
Returnsthe void object null()
of type DOM_NULL.
Side
EffectsThe formatting of the output of info is sensitive to
the environment variable TEXTWIDTH.
Related
Functionshelp, export, print, setuserinfo, userinfo
Detailsinfo prints a short descriptive information about
object if available. Typically, only domains and function
environments provide such information.object is a domain,
additional information is given about the methods of the domain.info without arguments prints the names of
all available system libraries.overloading info.
If object is a user-defined domain or function
environment providing a slot
"info", whose value is a string, then the call
info(object) prints this string. See
example 2.
Example
1With info(), you obtain a list
of all libraries:
>> info()
-- Libraries:
Ax, Cat, Dom, Network, RGB,
Series, Type, adt, combinat, detools,
fp, generate, groebner, import, intlib,
linalg, linopt, listlib, matchlib, module,
numeric, numlib, ode, orthpoly, output,
plot, polylib, prog, property, solvelib,
specfunc, stats, stdlib, stringlib, student,
transform
The next example shows information about the library
property:
>> info(property)
Library 'property': properties of identifiers
-- Interface:
property::hasprop, property::implies, property::simpex
-- Exported:
assume, getprop, is, unassume
info prints information about preferences:
>> info(Pref::promptString)
A character string to be displayed as a prompt.
For some objects, info cannot give
information:
>> info(a + b)
Sorry, no information available.
Example
2info prints information about a function
environment:
>> info(sqrt)
sqrt -- the square root
sqrt is a
function environment and has a slot named "info":
>> domtype(sqrt), sqrt::info
DOM_FUNC_ENV, "sqrt -- the square root"
User-defined procedures can
contain short information. By default, info does not
return any useful information:
>> f := x -> x^2: info(f)
Sorry, no information available.
To improve this, we embed the function f
into a function environment and store an
information string in its "info" slot:
>> f := funcenv(f): f::info := "the squaring function": info(f)
the squaring function
>> delete f:
Backgroundobject of info is a domain, then the call
info(object) first prints the entry
"info", which must be a string. Then the entry "interface",
which must be a set of identifiers, is used
to display all public methods, and the entry "exported",
which is a set of identifiers created by
export, is used to
display all exported methods.