RM> int x,y,z;
RM> char buf[50] = "5 6";
RM> ret = sscanf(buf, "%d %d %d", &x, &y, &z);
RM> It just returns the number of fields read and converted. Perhaps
RM> the Borland line should have read "If sscanf attempts to start
RM> reading at end-of-string, the return value is EOF."
RM> What does the standard say it should do?
If there is an input failure before any conversion it should
return EOF. E.g. if you had done sscanf(buf, "hello %d %d",
&x, &y);
and then given buf = "goodbye 5 6". BFN.
Paul
@EOT:
---
* Origin: This is just another kludge line like SEENBY (3:711/934.9)
|