Re: Wha's up w/ field width in parsing input???



dpb <none@xxxxxxx> wrote in message <i12mii$vth$1@xxxxxxxxxxxxxxxxxxxxxxxxxx>...
Brought to light in another thread of poster w/ fixed width fields but no delimiter wherein import wizard, etc, failed to parse the empty fields.

Thought should be able to use the width but no; at least w/ my early version and as I read doc on current textscan() probably won't work there, either.

So, is the following

a) broke in early release but fixed now, or

b) wad?

>> s = ' 3 12.5';
>> [x,y,z]=strread(s,'%3d%3d%3.1f',1)
x =
3
y =
12
z =
0.5000
>>

OTOH,

>> [x,y,z]=strread(strrep(s,' ','0'),'%3d%3d%3.1f')
x =
3
y =
1
z =
2.5000

as expected/desired.

So, is there any way to parse the "empty" fields that aren't really empty w/o resorting to somesuch workaround as the above?

And, b) what is actually going on w/ the prior result--it makes no sense to me to get y=12 z=0.5, certainly.

--

I found this problem several times and apparently there is no way to parse empty fields (also confirmed by tech support) !!! I thought it was just my problem but since you bring it to our attention I can confirm that my solution was similar, resorting to replace and textscanning after.

Oleg
.



Relevant Pages

  • Whas up w/ field width in parsing input???
    ... Brought to light in another thread of poster w/ fixed width fields but no delimiter wherein import wizard, etc, failed to parse the empty fields. ...
    (comp.soft-sys.matlab)
  • Re: VBScript Regular Expression
    ... parse some data, add some stuff up, and display it to a user. ... these empty fields are causing an error. ... VBScript nuance. ... I am making problems more diffcult then they are.... ...
    (microsoft.public.scripting.vbscript)
  • Re: LC53 statistics
    ... input buffer is empty, refill if necessary. ... Essentially, what PARSE? ... terminator, or whether there was no terminator ...
    (comp.lang.forth)
  • Re: LC53 statistics
    ... the programmer can just replace colon with ... It is a factor of parse?. ... input buffer is empty, refill if necessary. ...
    (comp.lang.forth)
  • Re: VBScript Regular Expression
    ... parse some data, add some stuff up, and display it to a user. ... these empty fields are causing an error. ... VBScript nuance. ...
    (microsoft.public.scripting.vbscript)