Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!xanth!ames!dftsrv!mimsy!chris From: chris@mimsy.umd.edu (Chris Torek) Newsgroups: comp.std.c Subject: Another scanf interpretation question Message-ID: <21624@mimsy.umd.edu> Date: 4 Jan 90 08:31:35 GMT Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 21 The December 1988 draft standard indicates that for %[dioux] scanf conversions (and their |long| and suppressed-assignment variants), the format of the number is to match that accepted by strtol or strtoul. This is all well and good, except that strtol and strtoul are defined such that they `accept' numbers of the form + and - (which both convert to the value 0). This is reasonable for strtol and strtoul, but perhaps not so for scanf. The question, then, can be expressed this way: Should sscanf("+", "%d", &i) convert one integer, putting 0 in `i'? -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris