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

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

[Octave-bug-tracker] [bug #63383] Error in sscanf in special cases when


From: José Luis García Pallero
Subject: [Octave-bug-tracker] [bug #63383] Error in sscanf in special cases when '%f' conversion is used
Date: Fri, 18 Nov 2022 15:02:00 -0500 (EST)

Follow-up Comment #2, bug #63383 (project octave):

[comment #1 comentario nº1:]
> This problem also happens if you replace 'n' with 'i', and you can also see
what I think is a position error with '%d' in the following example:
> 
> 
> octave> [val, count, msg, pos] = sscanf ('1 2 3 -', '%d')
> val =
> 
>    1
>    2
>    3
> 
> count = 3
> msg = sscanf: format failed to match
> pos = 8
> 
> 
> What does Matlab do for this case?

Mmmm, in my case Octave returns:

>> [val, count, msg, pos] = sscanf ('1 2 3 -', '%d')
val =

   1
   2
   3

count = 3
msg =
pos = 8

The error message is not set. I'm running Octave 7.3.0 compiled by myself in
Debian Sid

On the other hand, Matlab 9.2.0.538062 (R2017a) returns:

>> [val, count, msg, pos] = sscanf ('1 2 3 -', '%d')
val =
     1
     2
     3
count =
     3

msg =
    'Matching failure in format.'

pos =
     7



    _______________________________________________________

Reply to this item at:

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

_______________________________________________
Mensaje enviado vía Savannah
https://savannah.gnu.org/




reply via email to

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