Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: textread/textscan not reading formatted text with whitespace
Replies: 19   Last Post: Oct 22, 2013 5:13 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Norbert Marwan

Posts: 7
Registered: 10/2/13
Re: textread/textscan not reading formatted text with whitespace
Posted: Oct 2, 2013 5:16 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

dpb <none@non.net> wrote in message <l2hv9g$6ah$1@speranza.aioe.org>...
> On 10/2/2013 2:15 PM, Norbert Marwan wrote:
> > dpb <none@non.net> wrote in message <l2hjad$476$1@speranza.aioe.org>...
> >>
> >> One would think it should be a bug indeed but unfortunately it isn't. :(
> >>

> > why not?
> > in my opinion this is a bug when it is not working as it should do. i do
> > not see any reason why the whitespace should not be counted when using
> > the format strings.
> >

> ...
>
> Unfortunately it's not a bug because it _is_ working as specified/should
> do. It's just that the definition of what the width field means on
> input w/ blanks isn't consistent with what it seems intuitively it
> should be (or what Fortran FORMAT means).
>
> You'd have to ask the authors of C the "why". It's what they chose to
> do on input scanning and since Matlab i/o is built around the C library
> functions, it (Matlab) behaves as do they (C i/o).
>
> That it (as well as much else about C formatted i/o, but really more on
> input than output) was a sorry choice I wholeheartedly agree but it's
> done and shall never change now, unfortunately.
>
> TMW _should_ however, build in another set of i/o functions that do
> follow Fortran-like behavior. Ideally these would also follow Fortran
> FORMAT syntax.
>
> Again, file the enhancement request...unfortunately as previously noted
> I harped on this years ago and it never received a lick of attention.
> My license support lapsed and at that point TMW wouldn't even accept
> offered bug reports so I gave up the crusade to simply harranguing here
> in cs-sm when the subject arises (as it doesn't quite regularly).
>

thanks for your feedback.

ok, i see i misunderstood your point with C in your last reply.

this strange behaviour can be remain as it is, but a simple convenient solution would be that when i specify the whitespace-option in the textread-function, this would then overwrite this stupid behaviour of jumping over white spaces.


Date Subject Author
10/2/13
Read textread/textscan not reading formatted text with whitespace
Norbert Marwan
10/2/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb
10/2/13
Read Re: textread/textscan not reading formatted text with whitespace
Norbert Marwan
10/2/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb
10/2/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb
10/2/13
Read Re: textread/textscan not reading formatted text with whitespace
Derek Goring
10/2/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb
10/2/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb
10/3/13
Read Re: textread/textscan not reading formatted text with whitespace
Norbert Marwan
10/3/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb
10/2/13
Read Re: textread/textscan not reading formatted text with whitespace
Norbert Marwan
10/2/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb
10/3/13
Read Re: textread/textscan not reading formatted text with whitespace
Norbert Marwan
10/3/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb
10/22/13
Read Re: textread/textscan not reading formatted text with whitespace
Norbert Marwan
10/22/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb
10/22/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb
10/22/13
Read Re: textread/textscan not reading formatted text with whitespace
Norbert Marwan
10/22/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb
10/22/13
Read Re: textread/textscan not reading formatted text with whitespace
dpb

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.