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

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

[Octave-bug-tracker] [bug #48235] ver.m does not output an empty struct


From: Garrett Euler
Subject: [Octave-bug-tracker] [bug #48235] ver.m does not output an empty struct for an unknown package
Date: Wed, 15 Jun 2016 18:05:09 +0000 (UTC)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:38.0) Gecko/20100101 Firefox/38.0

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

                 Summary: ver.m does not output an empty struct for an unknown
package
                 Project: GNU Octave
            Submitted by: ggeuler
            Submitted on: Wed 15 Jun 2016 06:05:06 PM GMT
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Regression
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.2
        Operating System: Any

    _______________________________________________________

Details:

In Octave 3.8.2- calling ver.m on an unknown package produced an empty struct
- which is what ver.m does in Matlab too.  Octave stable (4.0.2) & dev now
produce a scalar struct with empty fields which is not compatible with
previous Octave and Matlab.

As an example, this makes testing for a missing package go from:

if(isempty(ver('mypackage')))

to:

mypkg=ver('mypackage');
if(isempty(mypkg) || isempty(mypkg.Version))


I have attached a small patch to fix the issue (affects a single command
within ver.m and adds a test).



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 15 Jun 2016 06:05:06 PM GMT  Name: octave4_ver.diff  Size: 1kB   By:
ggeuler

<http://savannah.gnu.org/bugs/download.php?file_id=37492>

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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