## `Pref::callBack` -- informations during evaluation

#### Introduction

`Pref::callBack(`func`)` defines a function `func`, that will be called frequently during evaluation.

#### Call(s)

`Pref::callBack( <func>)`

#### Parameters

`func` | - | function to display informations

#### Returns

the previously defined function

#### Related Functions

`Pref::report`, `Pref::postInput`, `Pref::postOutput`

#### Details

- 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`.

#### 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((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

#### Changes

- no changes

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000