[DGD] Use of sscanf
Erwin Harte
harte at is-here.com
Wed May 7 17:40:37 CEST 2003
On Wed, May 07, 2003 at 11:36:23AM -0400, Jay Shaffstall wrote:
[...]
> Is this what is supposed to happen? I had expected that if the string did
> not contain an integer, then %d would not match anything, and my code would
> continue on to try to match a float.
Yes, that is supposed to happen, similar to how this:
sscanf("12foo", "%d", i)
will give a return-value of 1 and i will have the value 12 assigned to
it.
Erwin.
--
Erwin Harte | I'm using a whitelist to block spam. If you get
harte at is-here.com | a bounce when emailing me directly that either
| means you haven't emailed me in the past 7 years
| or your address changed. If so, please register.
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list