> < ^ Date: Thu, 12 Jan 1995 12:58:00 +0100 (WET)
> < ^ From: Martin Schoenert <martin.schoenert@math.rwth-aachen.de >
> < ^ Subject: Re: Unbind()
Gene Cooperman wrote in his e-mail message of 1995/01/07

The GAP manual says that Unbind() can be used to unbind fields of a record
and array elements. I noticed that it also works in the following:
x:=3;
Unbind(x);
x;
<returns appropriate notice that x is unbound>

Is this usage supported?
I find it useful in removing extraneous temporary global variables after
their use, to avoid accidental collisions with variables of the same name
later.

There are four cases in which 'Unbind' can currently be used.

1) To unbind a component of a list.
2) To unbind a component of a record.
3) To unbind a global variable.
4) To unbind a local variable.

The GAP manual mentions only the usages 1) and 2). Those are supported
now, and will always be supported, since they are the whole reason for
having 'Unbind' at all.

Usage 3) is probably what Gene meant with ``temporary global variables''.
This usage is supported now and will be supported by future GAP versions.

Usage 4) is supported now, but will probably not be supported by future
versions of GAP. But this is probably not important, since reusing a
local variable for different purposes in a function is not a good idea.

Martin.

-- .- .-. - .. -.  .-.. --- ...- . ...  .- -. -. .. -.- .-
Martin Sch"onert,   Martin.Schoenert@Math.RWTH-Aachen.DE,   +49 241 804551
Lehrstuhl D f"ur Mathematik, Templergraben 64, RWTH, 52056 Aachen, Germany

> < [top]