Previous Page Next Page Contents

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

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




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000