Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!purdue!haven!mimsy!chris From: chris@mimsy.umd.edu (Chris Torek) Newsgroups: comp.std.c Subject: Re: Another scanf interpretation question Message-ID: <21632@mimsy.umd.edu> Date: 4 Jan 90 19:12:41 GMT References: <21624@mimsy.umd.edu> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 12 In article <21624@mimsy.umd.edu> I wrote: >... strtol and strtoul are defined such that they `accept' numbers >[consisting of only a sign] Oops: although they return zero, they do not consume the sign, so that given `strtol("-", &endptr, 0)', *endptr will be '-'. In effect, they do not accept numbers consisting of only a sign. (In other words, the floating point question applies.) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris