[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #52550] textscan drops delimiter character for
From: |
Dan Sebald |
Subject: |
[Octave-bug-tracker] [bug #52550] textscan drops delimiter character for multi-character, cell-specified delimiter option |
Date: |
Wed, 29 Nov 2017 00:24:58 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Follow-up Comment #2, bug #52550 (project octave):
Some observations:
textscan, generally, has an abundance of FIXME's throughout.
This bug is not a whitespace issue because the same behavior exists when the
delimiter is comma:
octave:1> a = ",,a,b,c\n";
octave:2> textscan(a, '%s', 'delimiter', ',')
ans =
{
[1,1] =
{
[1,1] =
[2,1] =
[3,1] = a
[4,1] = b
[5,1] = c
}
}
octave:3> textscan(a, '%s', 'delimiter', {','})
ans =
{
[1,1] =
{
[1,1] =
[2,1] = a
[3,1] = b
[4,1] = c
}
}
Also, the dropping of the delimiter is in the recursive loop portion of the
code, not prior to the loop because the number of empty entries for the latter
case is always half that of the former:
octave:4> a = ",,,,,,a,b,c\n";
octave:5> textscan(a, '%s', 'delimiter', ',')
ans =
{
[1,1] =
{
[1,1] =
[2,1] =
[3,1] =
[4,1] =
[5,1] =
[6,1] =
[7,1] = a
[8,1] = b
[9,1] = c
}
}
octave:6> textscan(a, '%s', 'delimiter', {','})
ans =
{
[1,1] =
{
[1,1] =
[2,1] =
[3,1] =
[4,1] = a
[5,1] = b
[6,1] = c
}
}
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52550>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #52550] textscan drops delimiter character for multi-character, cell-specified delimiter option, Dan Sebald, 2017/11/29
- [Octave-bug-tracker] [bug #52550] textscan drops delimiter character for multi-character, cell-specified delimiter option, Dan Sebald, 2017/11/29
- [Octave-bug-tracker] [bug #52550] textscan drops delimiter character for multi-character, cell-specified delimiter option,
Dan Sebald <=
- [Octave-bug-tracker] [bug #52550] textscan drops delimiter character for multi-character, cell-specified delimiter option, Dan Sebald, 2017/11/29
- [Octave-bug-tracker] [bug #52550] textscan drops delimiter character for multi-character, cell-specified delimiter option, Dan Sebald, 2017/11/29
- [Octave-bug-tracker] [bug #52550] textscan drops delimiter character for multi-character, cell-specified delimiter option, Dan Sebald, 2017/11/29
- [Octave-bug-tracker] [bug #52550] textscan drops delimiter character for multi-character, cell-specified delimiter option, Rik, 2017/11/29
- [Octave-bug-tracker] [bug #52550] textscan drops delimiter character for multi-character, cell-specified delimiter option, Dan Sebald, 2017/11/29
- [Octave-bug-tracker] [bug #52550] textscan drops delimiter character for multi-character, cell-specified delimiter option, Rik, 2017/11/29
- [Octave-bug-tracker] [bug #52550] textscan drops delimiter character for multi-character, cell-specified delimiter option, Dan Sebald, 2017/11/29