Hi,
the current implementation of clear() tries to mimic the M* approach
for
a few arguments (namely all, functions, global, variables).
I think it makes sense to add "exclusive" to this list. Consider the
following (3.0.0):
==========================================
octave3.0:25> a = 1; global b = 2;
octave3.0:26> clear -exclusive b
octave3.0:27> b,a
b = 2
error: `a' undefined near line 27 column 3
==========================================
As expected, a is removed and b survives.
==========================================
octave3.0:27> a = 1; global b = 2;
octave3.0:28> clear exclusive b
octave3.0:29> a,b
a = 1
error: `b' undefined near line 29 column 3
==========================================
Now, "b" is removed and "a" survives, which I find highly surprising.