Previous Page Next Page Contents

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

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




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000