Pref::callBack

Informations during evaluation

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

Pref::callBack(<func>)

Description

The function func defined by Pref::callBack(func) will be called permanently, when the MuPAD® kernel works. Therewith informations can be displayed to inform the user.

A call of Pref::callBack without arguments returns the current value. The argument NIL resets the default value, which is NIL.

Examples

Example 1

The following combination of Pref::postInput (initialization) and time count with Pref::callBack shows the seconds during evaluating.

Pref::postInput(proc() begin START:= time(); TIME:= START end_proc):
Pref::callBack(proc()
               begin
                 if time() - TIME > 1000 then // 1 sec
                   TIME:= TIME+1000;
                   print(floor((time() - START)/1000))
                 end_if
               end_proc):
NOW:= time():
while time() - NOW <= 10000 do 1 end_while:

Parameters

func

Function to display informations

Return Values

Previously defined function

See Also

MuPAD Functions

Was this topic helpful?