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

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

[Octave-bug-tracker] [bug #45712] strread bug when ignoring a string


From: anonymous
Subject: [Octave-bug-tracker] [bug #45712] strread bug when ignoring a string
Date: Fri, 07 Aug 2015 12:47:09 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.1.0

URL:
  <http://savannah.gnu.org/bugs/?45712>

                 Summary: strread bug when ignoring a string
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Fri 07 Aug 2015 12:47:07 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Francesco Potortì
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.0
        Operating System: GNU/Linux

    _______________________________________________________

Details:

This is correct:

>> [a b c d] = strread("14 :5 z:11:-15:1", "%f%s%f%f%*", 'delimiter', ":")
a =  14
b =
{
  [1,1] = 5 z
}
c =  11
d = -15

Now trying, and failing, to ignore the second word:

>> [a c d] = strread("14 :5 z:11:-15:1", "%f%*s%f%f%*", 'delimiter', ":")
a =
   14
    1
c = NaN
d =  11

strread reads 14, then reads "5" and "z" as two different words, using space
as a delimiter rather than colon.

Maybe this has to do with the string beginning with a digit, or containing a
space, sorry, did not investigate further.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45712>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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