octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #65390] fscanf produces 1 line too much


From: Rik
Subject: [Octave-bug-tracker] [bug #65390] fscanf produces 1 line too much
Date: Sat, 2 Mar 2024 13:50:31 -0500 (EST)

Update of bug #65390 (group octave):

              Depends on:                         => bugs #63467            

    _______________________________________________________

Follow-up Comment #9:

I hate this function, so many corner cases.

@jwe: The patch correctly restores reading two values instead of three. 
However, the third output (error message) is wrong.  See below.


octave:1> s = "1 2\n"
s = 1 2

octave:2> [a,b,c,d] = sscanf (s, '%f %f')
a =

   1
   2

b = 2
c = sscanf: format failed to match
d = 5


The output 'c' should be empty because there is no error.


Separately, bug #63467 is definitely related and is also solved by jwe's
patch.  


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?65390>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]