octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #37521] clear('functions') deletes subfunction


From: anonymous
Subject: [Octave-bug-tracker] [bug #37521] clear('functions') deletes subfunctions
Date: Tue, 09 Oct 2012 06:23:24 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1

Follow-up Comment #6, bug #37521 (project octave):

Philip, what does the behavior with respect to persistent variables have to do
with anything? I do not understand what difference you interpret into
'clearing' vs. 'reinitializing' persistent variables. But anyway, Octave's
behavior with respect to persistent variables is quite correct and consistent
with Matlab. That includes calling clear('functions') from within or from
without a function.

When I say the expected behavior is to clear persistent variables, then I am
asserting that what is unexpected is that: "Calling clear('functions') in a
function causes all subfunctions to become undefined."

So let me just put that in different words again: If I call clear('functions')
from within a function, Octave does not only "reinitialize persistent
variables", but it removes all subfunctions in that same function from the
namespace. Those subfunctions cannot be used any more (at least not in the
same call to that function).

Nothing in the Matlab documentation can be construed as a specification of
such behavior, and regardless of Matlab compatibility it is quite nonsensical
to do this.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?37521>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]