02.07.2013 Views

A/UX® Programmer's Reference Sections

A/UX® Programmer's Reference Sections

A/UX® Programmer's Reference Sections

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

strtod(3C) strtod(3C)<br />

NAME<br />

strtod - convert string to double-precision number<br />

SYNOPSIS<br />

double strtod (str, ptr)<br />

char *str, **ptr;<br />

DESCRIPTION<br />

strtod returns as a double-precision floating-point number, the<br />

value represented by the character string pointed to by str. The<br />

string is scanned up to the first unrecognized character.<br />

strtod recognizes an optional string of "white-space" characters<br />

(as defined by isspace in ctype(3C)), then an optional<br />

sign, then a string of digits optionally containing a decimal point,<br />

then an optional e or E followed by an optional sign or space, followed<br />

by an integer.<br />

If the value of ptr is not (char * *) NULL, a pointer to the character<br />

terminating the scan is returned in the location pointed to by<br />

ptr. If no number can be formed, *ptr is set to str, and zero is returned.<br />

SEE ALSO<br />

bstring(3), atof(3C), ctype(3C), memcpy(3C),<br />

scanf(3S), string(3C). strtol(3C).<br />

DIAGNOSTICS<br />

If the correct value would cause overflow, ±HUGE is returned (according<br />

to the sign of the value), and errno is set to ERANGE.<br />

If the correct value would cause underflow, zero is returned and<br />

errno is set to ERANGE.<br />

1<br />

February, 1990<br />

RevisionC

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!