bugGNU Octave - Bugs: bug #56959, issue warning when range operator...

 
 

bug #56959: issue warning when range operator has complex arguments

Submitter:  Rik <rik5>
Submitted:  Fri 27 Sep 2019 08:27:43 PM UTC
   
 
Category:  Interpreter Severity:  1 - Wish
Priority:  3 - Low Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 13 Oct 2019 04:33:21 PM UTC, comment #3: 

Fine.  I updated the warning message here https://hg.savannah.gnu.org/hgweb/octave/rev/19ba2619d746.

Rik <rik5>
Group administrator
Sun 13 Oct 2019 02:22:36 PM UTC, comment #2: 

I would suggest to word this warning a bit differently:


diff -r c2c9185d3389 libinterp/octave-value/ov.cc
--- a/libinterp/octave-value/ov.cc      Sat Oct 12 17:33:28 2019 -0700
+++ b/libinterp/octave-value/ov.cc      Sun Oct 13 16:14:31 2019 +0200
@@ -2552,7 +2552,7 @@

       if (base.iscomplex () || limit.iscomplex ()
           || (increment.is_defined () && increment.iscomplex ()))
-        warning ("complex portion of colon arguments is ignored");
+        warning ("imaginary part of complex colon arguments is ignored");

       Matrix m_base, m_limit, m_increment;


A.R. Burgers <arb>
Sun 13 Oct 2019 12:34:29 AM UTC, comment #1: 

Fixed in this changeset (https://hg.savannah.gnu.org/hgweb/octave/rev/c2c9185d3389).

Closing report.

Rik <rik5>
Group administrator
Fri 27 Sep 2019 08:27:43 PM UTC, original submission:  

The range operator does not support complex arguments.  That by itself is fine, but it would be nice if there was a warning issued by the interpreter that they are unsupported.  Instead, Octave just returns an empty matrix.

Sample code to reproduce:


x = -pi*i:0.1*i:pi*i
x = [](1x0)


For comparison, Matlab returns the empty matrix, but also issues a warning.

Rik <rik5>
Group administrator

 

(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 arb (Posted a comment)
  • -email is unavailable- added by rik5 (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-10-13 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2019-09-27 rik5 Priority5 - Normal 3 - Low

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code