The following code does not behave as I expect, and I cannot understand
why not.
int i1,i2,i0; double x,y,z; char s[100];
k=sscanf(s,"%n%le %n%le %n%le %n",&i0,&x,&i1,&y,&i2,&z,&i);
When s=" 1.0000000E+06 1.0000000E+04 0.0000000E+00"
01234567890123456789012345678901234567890123456789 0
0 1 2 3 4 5
execution of the sscanf produces the results
i0=0
i1=21
i2=38
k=3
x=1e6, y=1e4, z=0
all as expected, but i=17, when I expect 51 (the total number of
characters read in this sscanf.
This is being run under Windows XP, Visual C++ 6 sp5.
sh************@computer.org (remove caps to get e-mail)