bugGNU Octave - Bugs: bug #41767, feval not updating function

 
 

bug #41767: feval not updating function

Submitter:  Muhali <muhali>
Submitted:  Mon 03 Mar 2014 04:02:16 PM UTC
   
 
Category:  Interpreter Severity:  2 - Minor
Priority:  3 - Low Item Group:  Incorrect Result
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 15 Dec 2016 12:14:35 PM UTC, comment #3: 

This issue is still present in Octave 4.2.0.

Hartmut <hardy>
Wed 05 Mar 2014 08:40:13 AM UTC, comment #2: 

Matlab does not allow for function definitions within the code. When defined in an extra function file (eg. 'A.m') it updates correctly as octave.

In slight modification, with ~a/A.m and ~/b/A.m returning pi and e, resp., both ML and octave display pi when executing


addpath ~/a
fun = @A ;
disp(feval(fun)) ;
rmpath ~/a

addpath ~/b
disp(feval(fun)) ;


Muhali <muhali>
Wed 05 Mar 2014 03:59:43 AM UTC, comment #1: 

Does Matlab behave differently?  That would be one important consideration.

Rik <rik5>
Group administrator
Mon 03 Mar 2014 04:02:16 PM UTC, original submission:  

The code


function y = A()
   y = pi ;
end

fun = @A ;

function y = A()
   y = e ;
end

disp(feval(@A)) ;
disp(feval(fun)) ;


shows that the second call to feval does actually not call the updated function 'A'.

When defining 'A' in a function file 'A.m' and doing the updating there everything works, so I'm not sure if this is really a bug.

Muhali <muhali>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by lachlan (Updated the item)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by muhali (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-02-08 lachlan Severity3 - Normal 2 - Minor
        Priority5 - Normal 3 - Low

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code