## `Pref::noProcRemTab` -- disable ``remember'' tables

#### Introduction

`Pref::noProcRemTab(`TRUE`)` disables the ``remember'' tables.

#### Call(s)

`Pref::noProcRemTab( <value>)`

#### Parameters

`value` | - | `TRUE`, `FALSE`, or `NIL`

#### Returns

the last defined value

#### Side Effects

Without the ``remember'' tables the computation of any functions will be very much slower. The results are the same.

#### Related Functions

`proc`

#### Details

- With `Pref::noProcRemTab(`TRUE`)` the ``remember'' tables of procedures can be disabled. `Pref::noProcRemTab(`FALSE`)` enables the ``remember'' tables.
- With the option `remember` of procedures results of calculations will be kept and ``recycled'': If a function will be called with the same arguments once again the previously calculated result will be returned immediately.
- A call of `Pref::noProcRemTab` without arguments returns the current value. The argument `NIL` resets the default value, which is `FALSE`.

#### Example 1

Because of the unclever definition, the function `fac` (factorial function) will be called permamently with the same arguments, and thats very often. The option `remember` corrects this, as a previous calculated result will be returned immediately without a new call of the function `fac`.

    >> reset():
       fac:= proc(n = 1)
               option remember;
             begin
               if n > 2 then
                 fac(n - 1)*fac(n - 2)
               else
                 n
               end_if
             end_proc:
       time(fac(28))

                                        890

Without this ``remember'' mechanism the effect of the unclever definition will be gigantic, even on a very hurry computer. Don't try `fac(32)`.

    >> reset():
       Pref::noProcRemTab(TRUE):
       time(fac(28))

                                       13600

#### Changes

- no changes

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