octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #58008] textscan: literals are managed differe


From: anonymous
Subject: [Octave-bug-tracker] [bug #58008] textscan: literals are managed differently depending on delimiters
Date: Fri, 20 Mar 2020 06:46:55 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0

Follow-up Comment #6, bug #58008 (project octave):


[comment #5 comment #5:]
> Looks a bit weird to me that a delimiter is also a literal, and/or _vice
versa_. AFAIK delimiters and literals are supposed to be separate entities,
although in a way one could say that they work similarly.
> 
> But maybe this points to where the issue lies.
> 

I agree. The Octave manual (v 5.1.0), under the textscan description reports
"As in fscanf, any (non-whitespace) text in the format that is not one of
these specifiers is considered a literal." So the semicolon should be
considered a literal, not a delimiter.

Anyway, thank you very much to Mike Miller for the hint. This solves my issue,
as I have to deal with many external files with semicolon delimiter.

As far as I can see, however, the general problem is not solved. Indeed, I was
not able to manage the tab-delimiter case.

I tried with

mm=textscan(fid,'literal%s\t literal%s','Delimiter','\t')

and also tried to change from single to double quote to check how the string
is interpreted, but without success.

Do you have a workaround also for the tab-delimiter case?

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58008>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]