bugGNU Octave - Bugs: bug #56396, sscanf third output (error...

 
 

bug #56396: sscanf third output (error message) is empty even when pattern fails to match

Submitter:  Rik <rik5>
Submitted:  Mon 27 May 2019 03:25:56 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Missed Error or Warning
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
   

Mon 03 Jun 2019 04:05:58 PM UTC, comment #1: 

Fixed in this changeset (https://hg.savannah.gnu.org/hgweb/octave/rev/30f53f7a7293).  Closing report.

Rik <rik5>
Group administrator
Mon 27 May 2019 03:25:56 PM UTC, original submission:  

This bug was uncovered by bug #56200 about the fourth argument of sscanf being incorrect in certain cases.

Consider the following example:


[val, count, errmsg, nextpos] = sscanf ('1234a6', '%2d', 3)


According to the documentation, and verified with Matlab, this should return two numbers in the array val ([12; 34]), count is 2, the nextpos position in the stream is 5, and errsmsg should contain some text about how the pattern failed to match.

In Octave, however, the third argument is empty.



val =

   12
   34

count =  2
errmsg =
nextpos =  5


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

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-06-03 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
        Release5.1.0 dev
    2019-05-27 rik5 Dependencies- Depends on bugs #56200

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code