Article View: comp.std.c
Article #1527Re: strtoul("-10", ...)
From: Doug Gwyn
Date: Thu, 26 Jul 1990 19:22
Date: Thu, 26 Jul 1990 19:22
10 lines
940 bytes
940 bytes
In article <GAFTER.90Jul24163928@m2.csc.ti.com> <gafter@csc.ti.com> (Neal M Gafter) writes: >... I presumed the sentence about the minus sign was to >allow the string "-0" and to recognize (as errors) other negative >numbers. No, in fact this was discussed at the last X3J11 interpretation meeting. The negation is modulo longwordsize, and thus cannot overflow if the conversion of the portion after the "-" prefix did not overflow. (By "overflow" I mean that the converted value value is not representable in an unsigned long datum.)
Technical Details
Message-ID:
<13420@smoke.BRL.MIL>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwynReferences:
<GAFTER.90Jul24163928@m2.csc.ti.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: strtoul("-10", ...)
Message-ID: <13420@smoke.BRL.MIL>
Date: 26 Jul 90 19:22:07 GMT
References: <GAFTER.90Jul24163928@m2.csc.ti.com>
Organization: U.S. Army Ballistic Research Laboratory, APG, MD.
Lines: 10