print useful information to the user - Maple Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Programming : Resource Management : userinfo

userinfo - print useful information to the user

Calling Sequence

userinfo(lev, fn, e1, e2 ... )




non-negative integer



procedure name or set of procedure names



any expression



(optional) any expression



The procedure userinfo is used in Maple procedures to print useful information to the user.


The first argument lev is a non-negative integer which determines the infolevel setting at which information will be printed.


The second argument fn is a procedure name or set of procedure names for which this information is to be printed. The information will be printed if the global assignment infolevel[fn] := Lev; or infolevel[all] := Lev; was entered before invoking the procedure containing the userinfo statement, and levLev.


It is possible to have the name for which the information is printed different from the name of the procedure in which this information is given.  This is useful when writing a set of routines that work together.  You can set the infolevel for a set of routines at the same time.


If the third argument is the symbol 'NoName', this argument will be discarded and no function name will be printed. Otherwise, the name of the invoked procedure is printed using lprint, followed by a colon and 3 spaces. Then the third (or fourth) and optional other arguments are evaluated and lprinted together, but separated by 3 spaces.  If one of the arguments is of the form print(...) then that argument is prettyprinted.  If one of the arguments is of the form lprint(...) then that argument is printed on a separate line.


The user must assign a non-negative integer to some of the entries in the global table infolevel before invoking the procedure.   If the entry infolevel[all] is a non-negative integer then every userinfo call will print if its level is less than or equal to infolevel[all] .


Throughout the Maple library userinfo statements have been used with the following conventions:


Level 1: reserved for information that the user must be told.


Level 2,3: general information, including technique or algorithm being used.


Level 4,5: more detailed information about how the problem is being solved


The item infolevel[hints] is initialized to a value 1. Maple sometimes returns unevaluated answers when it does not have enough information to produce an explicit answer (because, for example, such an answer would not be correct over all complex numbers). This facility is intended to report hints as to which further information, given through assume(), would enable Maple return an explicit answer.

Thread Safety


The userinfo command is thread-safe as of Maple 15.


For more information on thread safety, see index/threadsafe.


a1 := proc(x,y) userinfo(3,a1,`entered with`,x,y); x+y end proc:



a1:   entered with   3   4



Use a different name for infolevel setting

a2 := proc(x,y) userinfo(3,myname,`entered with`,x,y); x-y end proc:



a2:   entered with   5   2



See Also

assume, lprint, print, procedure

Download Help Document

Was this information helpful?

Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam