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

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

[Octave-bug-tracker] [bug #58008] textscan: literals are managed differe


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #58008] textscan: literals are managed differently depending on delimiters
Date: Wed, 18 Mar 2020 16:07:47 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0

Update of bug #58008 (project octave):

                Category:             Interpreter => Octave Function        
              Item Group:                    None => Incorrect Result       
                  Status:                    None => Confirmed              
                 Release:                   5.1.0 => dev                    

    _______________________________________________________

Follow-up Comment #1:

Confirmed with Octave-5.2.0 & 7.0.0.

FYI, there is a slow workaround using textread (or strread when reading from
string):

>> [a, b] = strread (txt, 'literal%s literal%s', 'Delimiter', ';')
a =
{
  [1,1] = _other_1_1
  [2,1] = _other_2_2 literal_other_3_1
}

b =
{
  [1,1] = _other_1_2 literal_other_2_1
  [2,1] = _other_3_2
}

>> [a, b] = strread (txt, 'literal%s literal%s', 'Delimiter', ';\n')
a =
{
  [1,1] = _other_1_1
  [2,1] = _other_2_1
  [3,1] = _other_3_1
}

b =
{
  [1,1] = _other_1_2
  [2,1] = _other_2_2
  [3,1] = _other_3_2
}


so you'll note that you do need to add the EOL ("\n") to the delimiter
collection for textread (and strread, textread's workhorse behind the scenes)
to work.

Release -> dev


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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