bugGNU Octave - Bugs: bug #50875, which() returns 'built-in...


bug #50875: which() returns 'built-in function' for user object methods

Submitted by:  Ray Zimmerman <rdzman>
Submitted on:  Tue 25 Apr 2017 04:26:30 PM UTC  
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Duplicate Assigned to:  None
Originator Name:  Ray Zimmerman Open/Closed:  Closed
Release:  4.2.1 Operating System:  Mac OS

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Tue 25 Apr 2017 04:37:28 PM UTC, comment #3: 

Thanks for your bug report. This bug has already been reported, so closing as a duplicate. Please follow up on bug #49434.

Mike Miller <mtmiller>
Project Administrator
Tue 25 Apr 2017 04:31:00 PM UTC, comment #2: 

Sorry, I meant to say that in Octave which() returns an empty string.

Ray Zimmerman <rdzman>
Tue 25 Apr 2017 04:29:52 PM UTC, comment #1: 

I should add that when called as a function which() returns an empty string for each of the examples provided, while Matlab returns the path string for the first and last example.

Ray Zimmerman <rdzman>
Tue 25 Apr 2017 04:26:30 PM UTC, original submission:  

For a user-defined class 'myclass', which() has different behavior on Octave and Matlab. For example, given the attached file, placed in a @myclass directory on the path, I get the following:


>> which myclass
/Users/ray/test/@myclass/myclass.m  % myclass constructor

>> which @myclass
'@myclass' not found.

>> which @myclass/myclass
/Users/ray/test/@myclass/myclass.m  % myclass constructor


> which myclass
'myclass' is a built-in function

> which @myclass

> which @myclass/myclass
'@myclass/myclass' is a built-in function

Ray Zimmerman <rdzman>


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

Attach Files:

Attached Files
file #40506:  myclass.m added by rdzman (180B - application/octet-stream)


   bug dependencies.

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by rdzman (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-04-25 mtmiller StatusNone => Duplicate
        Open/ClosedOpen => Closed
        Dependencies- => Depends on bugs #49434
    2017-04-25 rdzman Attached File- => Added myclass.m, #40506

    Back to the top

    Powered by Savane 3.6