Pref::callBack -- informations
during evaluation
IntroductionPref::callBack(func) defines a function
func, that will be called frequently during
evaluation.
Call(s)Pref::callBack( <func>)
Parametersfunc |
- | function to display informations |
Returnsthe previously defined function
Related
FunctionsPref::report, Pref::postInput, Pref::postOutput
Detailsfunc defined by
Pref::callBack(func) will be called
permanently, when the MuPAD kernel works. Therewith informations
can be displayed to inform the user.Pref::callBack without arguments returns the
current value. The argument NIL resets the default value,
which is NIL.
Example
1The 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((time() - START) div 1000)
end_if
end_proc):
NOW:= time():
while time() - NOW <= 10000 do 1 end_while:
1
2
3
4
5
6
7
8
9