info

Prints short information

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

info(object)
info()

Description

info(object) prints short information about object.

info prints a short descriptive information about object.

If object is a domain, additional information is given about the methods of the domain.

A call to info without arguments prints a reference to a random help page.

Users can add information about their own functions and domains by overloadinginfo. 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.

Examples

Example 1

With info(), you obtain a reference to a random help page:

info()
-- Help page of the day:   
?input

The next example shows information about the library property:

info(property)
Library 'property': properties of identifiers
-- Interface:
property::depends, property::hasprop,            

info prints information about preferences:

info(Pref::autoPlot)
Automatically plot graphical objects instead of typesetting

If no more information is available, a short type description is given:

info(a + b):
info([a, b]):
a + b -- an expression of type "_plus"
[a, b] -- of domain type 'DOM_LIST'

Example 2

info 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

User-defined procedures can contain short information. By default, info does only return some general information:

f := x -> x^2:  info(f):
f(x) -- a procedure of domain type 'DOM_PROC'

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 := "f -- the squaring function":
info(f)
f -- the squaring function
delete f:

Parameters

object

Any MuPAD® object

Return Values

Void object null() of type DOM_NULL.

Algorithms

If the argument object 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::stl, is used to display all exported methods.

See Also

MuPAD Functions

Was this topic helpful?