|
From: | Philip Nienhuis |
Subject: | [Octave-bug-tracker] [bug #46493] Incorrect result from fscanf and scanf with %i format |
Date: | Wed, 25 Nov 2015 14:07:07 +0000 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0 |
Follow-up Comment #7, bug #46493 (project octave): @Mike: Whether it's a bug or not might be debatable. All we can say is that Octave is compatible with Matlab (but perhaps bug-for-bug compatible). IMO it can be argued that "09" should also be something that "breaks the recognition of the number as octal" (as per comment #3). But Matlab itself has the final word: In table Input Arguments of http://nl.mathworks.com/help/matlab/ref/sscanf.html: "... If initial digit is 0, it is base 8." I'd conclude that Matlab's base detection logic is a bit quick and dirty, but we have to live with it. _______________________________________________________ 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] |