[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #56396] sscanf third output (error message) is
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #56396] sscanf third output (error message) is empty even when pattern fails to match |
Date: |
Mon, 27 May 2019 11:25:58 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko |
URL:
<https://savannah.gnu.org/bugs/?56396>
Summary: sscanf third output (error message) is empty even
when pattern fails to match
Project: GNU Octave
Submitted by: rik5
Submitted on: Mon 27 May 2019 08:25:56 AM PDT
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Missed Error or Warning
Status: Confirmed
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 5.1.0
Operating System: Any
_______________________________________________________
Details:
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
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56396>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #56396] sscanf third output (error message) is empty even when pattern fails to match,
Rik <=