[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #46493] Incorrect result from fscanf and scanf
From: |
Philip Nienhuis |
Subject: |
[Octave-bug-tracker] [bug #46493] Incorrect result from fscanf and scanf with %i format |
Date: |
Mon, 07 Dec 2015 18:52:16 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0 SeaMonkey/2.38 |
Update of bug #46493 (project octave):
Item Group: Incorrect Result => Matlab Compatibility
Status: Invalid => None
Open/Closed: Closed => Open
Release: 4.0.0 => dev
_______________________________________________________
Follow-up Comment #9:
Reopening this report after a more thorough check with Matlab.
Matlab r2014a (empty lines removed):
>> [VAL, COUNT, ERRMSG] = sscanf('''09''', '''%i''')
VAL =
0
COUNT =
1
ERRMSG =
Matching failure in format.
>> [VAL, COUNT, ERRMSG] = sscanf('"079"', '"%i"')
VAL =
7
COUNT =
1
ERRMSG =
Matching failure in format.
>>
whereas Octave-4.1.0+ gives:
>> [VAL, COUNT, ERRMSG] = sscanf('''09''', '''%i''')
VAL = 0
COUNT = 1
ERRMSG =
>> [VAL, COUNT, ERRMSG] = sscanf('"079"', '"%i"')
VAL = 7
COUNT = 1
ERRMSG =
>>
So Matlab, when explicitly queried using the ERRMSG output arg, informs one
that it found illegal characters, while Octave just remains silent.
Release => dev
Item group => Matlab Compatibility
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?46493>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #46493] Incorrect result from fscanf and scanf with %i format,
Philip Nienhuis <=