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

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

[Octave-bug-tracker] [bug #59304] exist() does not find myclass inside @


From: Ray Zimmerman
Subject: [Octave-bug-tracker] [bug #59304] exist() does not find myclass inside @myclass directory
Date: Mon, 19 Oct 2020 13:06:45 -0400 (EDT)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15

URL:
  <https://savannah.gnu.org/bugs/?59304>

                 Summary: exist() does not find myclass inside @myclass
directory
                 Project: GNU Octave
            Submitted by: rdzman
            Submitted on: Mon 19 Oct 2020 05:06:43 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: 6.0.90
         Discussion Lock: Any
        Operating System: Mac OS

    _______________________________________________________

Details:

Suppose I have in a directory on my Octave path, a subdirectory named @myclass
containing myclass.m with the following content:

classdef myclass < handle
end


In both, MATLAB and Octave the class works just fine. But exist('myclass')
returns 2 in MATLAB and 0 in Octave. On the other hand,
exist('@myclass/myclass') returns 2 on both.

MATLAB output:

>> obj = myclass

obj = 

  myclass with no properties.

>> exist('myclass')

ans =

     2

>> exist('@myclass/myclass')

ans =

     2


Octave output:

octave:1> obj = myclass
obj =

  myclass object with properties:


octave:2> exist('myclass')
ans = 0
octave:3> exist('@myclass/myclass')
ans = 2






    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59304>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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