Bug fix: Forgetting a single value

The statement forget(f, a, b, c,...) is supposed to cause the value of f(a,b,c,...) to be "forgotten", i.e. removed from the remember table for f and all functions with names beginning f/ . However, due to a bug in Release 5 this does not work: instead, the remember tables are cleared completely.

> f:= 'f': f(one):= 1: f(two):= 2:

The assignments to f(one) and f(two) cause those values to be saved in the remember table for f , so that later calls to f(one) or f(two) will use those values.

> f(one), f(two);

[Maple Math]

> readlib(forget):

> forget(f,one);

This should result in forgetting f(one) but retaining f(two) = 2 . This would happen in Release 4. However, in Release 5 both are forgotten:

> f(one),f(two);

[Maple Math]

The work-around is to use my procedure clear . This is a part of the Maple Advisor Database, and must be read in before use with readlib .

> readlib(clear):

> f:= 'f': f(one):= 1: f(two):= 2:

> f:= clear(f,delete={one}):

> f(one), f(two);

[Maple Math]

For a function of more than one variable, the proper form is f:= clear(f, delete={[a,b,...]}); .

> f(a,b,c):= d: f(c,b,a):= e:

> f:= clear(f,delete={[c,b,a]}):

> f(a,b,c), f(c,b,a);

[Maple Math]

See also: clear , forget , remember

Maple Advisor Database R. Israel, 1998