🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #6128

Plauger & Brodie strtod description

#6128
From: Richard A. O'Keefe
Date: Wed, 27 Dec 1989 00:35
10 lines
941 bytes
The railroad diagram on page 163 of "Standard C" by Plauger & Brodie
suggests that the string argument of strtod() must contain either a
decimal point or an exponent, so that strtod("1234", (char**)NULL)
must return 0.0 if called in the "C" locale.  This requirement matches
the syntax of floating-point constants in C, but it is more restrictive
than current versions of strtod(), which accept "1234".

Q1: have Plauger & Brodie got it right?
Q2: if they have got it right, why does the standard prohibit "1234"
    in *data*?
Technical Details
Message-ID: <1294@quintus.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!think!ames!sun-barr!newstop!sun!quintus!ok

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!think!ames!sun-barr!newstop!sun!quintus!ok
From: ok@quintus.UUCP (Richard A. O'Keefe)
Newsgroups: comp.std.c
Subject: Plauger & Brodie strtod description
Message-ID: <1294@quintus.UUCP>
Date: 27 Dec 89 00:35:24 GMT
Reply-To: ok@quintus.UUCP (Richard A. O'Keefe)
Organization: Quintus Computer Systems, Inc.
Lines: 10