[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #37961] textscan : whitespace specification do
From: |
Ben Abbott |
Subject: |
[Octave-bug-tracker] [bug #37961] textscan : whitespace specification doesn't work |
Date: |
Thu, 27 Dec 2012 21:13:45 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/536.26.17 (KHTML, like Gecko) Version/6.0.2 Safari/536.26.17 |
Follow-up Comment #10, bug #37961 (project octave):
Looking again, I see the OP's syntax is clumsy/ugly. If the whitespace
parameter is dropped then the statement below is in error.
A = textscan ('XQPCTick;Tag', '%s;%s');
The first "%s" will read the entire string. The will be no semicolon
remaining to match the "literal" one and nothing remaining to be read by the
second "%s".
The OP's full syntax does work for me with MatlabR2012b
A = textscan ('XQPCTick;Tag', '%s;%s', 'whitespace', ';');
A{:}
ans = 'XQPCTick'
ans = 'Tag'
While I don't see it in Mathworks documentation, it does appear that the
format string is parsed while respecting the "whitespace" parameter. However,
for the format string the characters " \t" are also respected.
I agree we shouldn't try to copy this "feature", as it leads to confusing
syntax (like the OP's).
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?37961>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #37961] textscan : whitespace specification doesn't work, anonymous, 2012/12/19
- [Octave-bug-tracker] [bug #37961] textscan : whitespace specification doesn't work, Philip Nienhuis, 2012/12/19
- [Octave-bug-tracker] [bug #37961] textscan : whitespace specification doesn't work, Jordi Gutiérrez Hermoso, 2012/12/19
- [Octave-bug-tracker] [bug #37961] textscan : whitespace specification doesn't work, Philip Nienhuis, 2012/12/19
- [Octave-bug-tracker] [bug #37961] textscan : whitespace specification doesn't work, Ben Abbott, 2012/12/19
- [Octave-bug-tracker] [bug #37961] textscan : whitespace specification doesn't work, Philip Nienhuis, 2012/12/20
- [Octave-bug-tracker] [bug #37961] textscan : whitespace specification doesn't work, Jordi Gutiérrez Hermoso, 2012/12/24
- [Octave-bug-tracker] [bug #37961] textscan : whitespace specification doesn't work, Ben Abbott, 2012/12/24
- [Octave-bug-tracker] [bug #37961] textscan : whitespace specification doesn't work, Ben Abbott, 2012/12/24
- [Octave-bug-tracker] [bug #37961] textscan : whitespace specification doesn't work, Philip Nienhuis, 2012/12/27
- [Octave-bug-tracker] [bug #37961] textscan : whitespace specification doesn't work,
Ben Abbott <=
- [Octave-bug-tracker] [bug #37961] textscan : whitespace specification doesn't work, Philip Nienhuis, 2012/12/27
- [Octave-bug-tracker] [bug #37961] textscan : whitespace specification doesn't work, Jordi Gutiérrez Hermoso, 2012/12/27
- [Octave-bug-tracker] [bug #37961] textscan : whitespace specification doesn't work, Philip Nienhuis, 2012/12/28
- [Octave-bug-tracker] [bug #37961] textscan : whitespace specification doesn't work, Philip Nienhuis, 2012/12/28
- [Octave-bug-tracker] [bug #37961] textscan : whitespace specification doesn't work, Jordi Gutiérrez Hermoso, 2012/12/30
- [Octave-bug-tracker] [bug #37961] textscan : whitespace specification doesn't work, Ben Abbott, 2012/12/30
- [Octave-bug-tracker] [bug #37961] textscan : whitespace specification doesn't work, Jordi Gutiérrez Hermoso, 2012/12/30
- [Octave-bug-tracker] [bug #37961] textscan : whitespace specification doesn't work, Philip Nienhuis, 2012/12/30