forget
Calling Sequence
Parameters
Description
Examples
forget( f, opts )
forget( f, a, b, c, ..., opts )
f
-
procedure or module; the object to forget
a, b, c, ...
(optional) specific argument sequence for f
opts
options of the form keyword = true or false, where keyword is one of subfunctions, forgetpermanent or reinitialize
The forget function is used to clear remember tables of procedures. Its precise action is controlled by the options given, whether f is a procedure or a module, and whether the remember table(s) in question is a pure remember table or a cache table.
The options are:
subfunctions = true or false (default: true)
If true, this causes forget(f) to also forget procedures related to f. If f is a module, this means all procedures in the module, including procedures in submodules. If f is a procedure which is not in a module, this means all procedures whose name is of the form f/.... If subfunctions=false and f is a an appliable module, only the remember table associated to the ModuleApply member of f is cleared. If subfunctions=false and f is a procedure which is not a module member, only the remember table associated to f itself is cleared. This option is ignored in the case when f is a procedure which is a module member.
forgetpermanent = true or false (default: false)
If true then permanent entries in cache-based remember tables are also removed. If not given, or given as forgetpermanent=false, only temporary entries in cache-based remember tables are cleared. This option is ignored for non-cache-based remember tables.
reinitialize = true or false (default: true)
This option only applies to the case when f is a procedure which is not a member of a module. In this case, if reinitialize=true, the corresponding procedure f is completely discarded and reloaded from its Maple archive, causing its remember table to be restored to its initial state.
forget(f, a, b, c, ..., opts) restricts the action of forget to clearing only remember table entry(s) indexed by the argument list [a, b, c, ...], and subject to the interpretations implied by the options in opts.
As a special case, specifying f as an empty range allows for selective clearing of remember table entries from all remember tables in the system. This requires a second argument, to indicate which entries to clear. For example, forget(..,x), which will clear all remembered entries in the system that reference x.
forget⁡evalc
sin⁡x;sin⁡π
sin⁡x
0
op⁡4,op⁡sin
Cache⁡512,temporary=−x=−sin⁡x,x=sin⁡x,permanent=0=0,π3=32,π2=1,π6=12,∞=undefined,π4=22,π=0,−∞=undefined,I=I⁢sinh⁡1
forget⁡sin,x,subfunctions=false
Cache⁡512,temporary=−x=−sin⁡x,permanent=0=0,π3=32,π2=1,π6=12,∞=undefined,π4=22,π=0,−∞=undefined,I=I⁢sinh⁡1
forget⁡sin,subfunctions=false
Cache⁡512,permanent=0=0,π3=32,π2=1,π6=12,∞=undefined,π4=22,π=0,−∞=undefined,I=I⁢sinh⁡1
forget⁡sin,forgetpermanent,reinitialize=false
Cache⁡512
forget⁡LinearAlgebra
See Also
appliable
archive
cache
module
option
procedure
Download Help Document