[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #52479] textscan ignores leading spaces when c
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #52479] textscan ignores leading spaces when creating cell from string/file |
Date: |
Fri, 24 Nov 2017 20:34:58 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Update of bug #52479 (project octave):
Item Group: Regression => Matlab Compatibility
Status: Need Info => In Progress
Release: 4.2.1 => dev
_______________________________________________________
Follow-up Comment #12:
I checked in the change on stable here
(http://hg.savannah.gnu.org/hgweb/octave/rev/ddc91a2ee0e0). That still leaves
a problem when the delimiter is specified in a cell array, rather than as a
single character. When specified as a single character, the code works.
octave:1> a = "\t\ta\tb\tc\n";
octave:2> textscan(a, '%s', 'delimiter', sprintf('\t'))
ans =
{
[1,1] =
{
[1,1] =
[2,1] =
[3,1] = a
[4,1] = b
[5,1] = c
}
}
But when the same character is presented as part of a cell array it is one
entry too short.
octave:4> textscan(a, '%s', 'delimiter', {sprintf('\t')})
ans =
{
[1,1] =
{
[1,1] =
[2,1] = a
[3,1] = b
[4,1] = c
}
}
Someone want to take a look at that? It is no longer a regression, so I'm
changing the report status to "Matlab Compatibility".
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52479>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #52479] textscan ignores leading spaces when creating cell from string/file, (continued)
- [Octave-bug-tracker] [bug #52479] textscan ignores leading spaces when creating cell from string/file, Dan Sebald, 2017/11/22
- [Octave-bug-tracker] [bug #52479] textscan ignores leading spaces when creating cell from string/file, Philip Nienhuis, 2017/11/22
- [Octave-bug-tracker] [bug #52479] textscan ignores leading spaces when creating cell from string/file, Dan Sebald, 2017/11/22
- [Octave-bug-tracker] [bug #52479] textscan ignores leading spaces when creating cell from string/file, Philip Nienhuis, 2017/11/23
- [Octave-bug-tracker] [bug #52479] textscan ignores leading spaces when creating cell from string/file, Rik, 2017/11/23
- [Octave-bug-tracker] [bug #52479] textscan ignores leading spaces when creating cell from string/file, Rik, 2017/11/23
- [Octave-bug-tracker] [bug #52479] textscan ignores leading spaces when creating cell from string/file, Motius, 2017/11/24
- [Octave-bug-tracker] [bug #52479] textscan ignores leading spaces when creating cell from string/file, Rik, 2017/11/24
- [Octave-bug-tracker] [bug #52479] textscan ignores leading spaces when creating cell from string/file, Motius, 2017/11/24
- [Octave-bug-tracker] [bug #52479] textscan ignores leading spaces when creating cell from string/file, Dan Sebald, 2017/11/24
- [Octave-bug-tracker] [bug #52479] textscan ignores leading spaces when creating cell from string/file,
Rik <=
- [Octave-bug-tracker] [bug #52479] textscan ignores leading spaces when creating cell from string/file, Dan Sebald, 2017/11/29
- [Octave-bug-tracker] [bug #52479] textscan ignores leading spaces when creating cell from string/file, Rik, 2017/11/29