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

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

[Octave-bug-tracker] [bug #47828] Problement with persistent handle and


From: Julien Bect
Subject: [Octave-bug-tracker] [bug #47828] Problement with persistent handle and "clear all"
Date: Mon, 02 May 2016 15:52:23 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0

URL:
  <http://savannah.gnu.org/bugs/?47828>

                 Summary: Problement with persistent handle and "clear all"
                 Project: GNU Octave
            Submitted by: jbect
            Submitted on: lun. 02 mai 2016 15:52:22 GMT
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.2
        Operating System: GNU/Linux

    _______________________________________________________

Details:

Consider the following m-file


function toto ()

persistent f
if isempty (f)
  disp Init
  f = @sqp;
  mlock
endif

f (0, @(x) (x - 1).^2)

endfunction


Then the following sequence of instruction leads to an error:

>> toto
Init
ans =  1.00000

>> toto
ans =  1.00000

>> clear all

>> toto
error: @empty_cf: no function and no method found
error: called from
    sqp at line 227 column 10
    toto at line 10 column 1


The handle to sqp stored in the persistent variable f appears to be
"corrupted" by clear.





    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message posté via/par Savannah
  http://savannah.gnu.org/




reply via email to

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