[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #58079] textscan goes past EOL when fmt contai
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #58079] textscan goes past EOL when fmt contains multiple items but input does not |
Date: |
Sun, 29 Mar 2020 21:37:50 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko |
URL:
<https://savannah.gnu.org/bugs/?58079>
Summary: textscan goes past EOL when fmt contains multiple
items but input does not
Project: GNU Octave
Submitted by: rik5
Submitted on: Sun 29 Mar 2020 06:37:49 PM PDT
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: Confirmed
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: dev
Discussion Lock: Any
Operating System: Any
_______________________________________________________
Details:
Sample code
C = textscan(sprintf ('one\ntwo\nthree\nfour\n'), '%s %s')
In Matlab, C{1} contains "one", "two", "three", "four", and C{2} contains four
"" entries.
In Octave, the newline gets eaten and the the second '%s' format takes the
next string.
C =
{
[1,1] =
{
[1,1] = one
[2,1] = three
}
[1,2] =
{
[1,1] = two
[2,1] = four
}
}
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58079>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #58079] textscan goes past EOL when fmt contains multiple items but input does not,
Rik <=