On 10/3/2013 2:29 PM, Norbert Marwan wrote: > Hi all, > > at least Octave is able to work correctly! Not at a first try, but when > I redefine the whitespace to be empty, the delimiter to be something > different than space (e.g. as comma), and use on %s as an output, it is > working as I wish! > > [s y m d] = > textread('test.txt','%4s%4.0f%2.0f%2.0f','delimiter',',','whitespace',''); > > The octave help for textread gave me the crucial hint: > > Unless whitespace is set to " (empty) AND > at least one "%s" format conversion specifier is supplied, a > space is always part of whitespace. > > > Otave finally shows that it is possible to have such workaround! > Best > NM
Although what if one doesn't have a string portion of the input record to treat as a %s? That seems like an artificial and potentially fatal limitation.
_Possible_ I don't think has ever been the argument... :)
Convincing TMW to make it has been less successful. :( (Altho as noted above and in the other subthread for potential performance reasons even I'm not convinced doing it in the existing functions is the best way to handle it even though I'm sure it could be made to work.)