NAME | SYNOPSIS | API RESTRICTIONS | DESCRIPTION | DIAGNOSTICS | ATTRIBUTES | SEE ALSO
$(NUCLEUS_DIR)/lib/classix/libsys_so.u.a #include <stdlib.h>double strtod(const char * str, char ** ptr);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
The strtod() function returns the value represented by the character string pointed to by str as a double-precision floating-point number . The string is scanned up to the first unrecognized character.
The strtod() function recognizes an optional string of white-space characters, then an optional sign, then a string of digits optionally containing a decimal point, then an optional e or E followed by an optional sign or space, followed by an integer.
If the value of ptr is not (char **)NULL , a pointer to the character terminating the scan is returned in the location pointed to by ptr . If a number cannot be formed, *ptr is set to str , and zero is returned.
The atof(str) call is equivalent to strtod(str, (char **)NULL).
If the correct value would cause overflow, HUGE is returned (according to whether the value is positive or negative), and, if supported, errno is set to ERANGE . If the correct value would cause underflow, zero is returned and, if supported, errno is set to ERANGE .
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | API RESTRICTIONS | DESCRIPTION | DIAGNOSTICS | ATTRIBUTES | SEE ALSO