bugGNU Octave - Bugs: bug #35838, Inconsistency between code and...

 
 

bug #35838: Inconsistency between code and documentation for array-{as,to}-{scalar,vector}

Submitted by:  Sébastien Villemot <svillemot>
Submitted on:  Wed 14 Mar 2012 04:35:12 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.6.1Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 16 Mar 2012 03:03:34 AM UTC, comment #2:

I have fixed the development branch of Octave by changing the code to reflect the documented behavior. The documentation has been in place since 2006 so it is surprising that this was not caught sooner. The change will not take effect until the 3.8.0 release. At that time you can use a simple perl script to change your existing code over.

perl -i.bak -pe 's/Octave:array-as-scalar/Octave:array-to-scalar/g' file1 file2 ...

and likewise for array-as-vector.

Rik <rik5>
Project Administrator
Thu 15 Mar 2012 12:44:30 AM UTC, comment #1:

I can confirm this bug on the development tip.

Can you post a simple piece of code which provokes the conversion warning?

Rik <rik5>
Project Administrator
Wed 14 Mar 2012 04:35:12 PM UTC, original submission:

The documentation contains the warning ID array-to-scalar (and array-to-vector), but the actual ID raised is array-as-scalar (and array-as-vector).

The only occurence in the code of the "to" versions is in src/error.cc, where default warning profile is set up.

There is obviously an inconsistency here.

I would prefer to keep the "as" versions and to drop the "to" versions, because my code already contains things like:

warning on
warning off Octave:array-as-scalar

(since it is the effective way of preventive these warnings to be disabled in the current state)

Sébastien Villemot <svillemot>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by svillemot (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 16 Mar 2012 03:03:34 AM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Thu 15 Mar 2012 12:44:30 AM UTCrik5StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1