Texas Instruments TI89 Developer Guide - Page 1151
strtod, Declaration, Categoryies, Description, Inputs, Outputs, errno, Assumptions, Side Effects
![]() |
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 1151 highlights
Appendix A: System Routines - Utilities 1109 strtod Declaration: double strtod (const char * nptr, char ** endptr) Category(ies): Description: Inputs: Outputs: Assumptions: Utilities, Direct Floating Point Operations, Strings Converts the initial portion of the string pointed to by nptr into a double (BCD floating-point number), and if endptr is not a null pointer, sets the character pointer pointed to by endptr to the address of the first character following the set of characters converted. The function skips leading whitespace, then accepts a sequence of characters matching a floating-point constant. The expected format of the floating-point constant consists of an optional sign character (+ or LF_NEGATIVE), followed by a sequence of one or more decimal digits optionally containing a decimal point, followed by an optional exponent. The optional exponent consists of LF_EXPONENT, followed by an optional sign, followed by one or more decimal digits. If the first nonwhitespace character is not a sign, decimal digit or a decimal point, the conversion fails. If the string contains an initial subset of the optional exponent, and strtod reaches an unrecognized character before scanning at least one decimal digit, the conversion fails. nptr - String to convert. endptr - Points to a character pointer that will contain the address of the first character following the set of characters converted when the function returns (or null). Returns the converted double value (BCD floating-point number). If endptr is not a null pointer, the object pointed to by it is assigned the address of the first character of the string following the converted floating-point number. If the conversion fails, zero is returned and * endptr is assigned the value nptr. If the result of the conversion would cause overflow, errno is set to ERANGE and returns plus or minus DBL_MAX. If the result of the conversion would cause underflow, errno is set to ERANGE and returns 0. None Side Effects: None Availability: On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None (continued) TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001
![](/manual_guide/products/texas-instruments-ti89-developer-guide-95b636f/1151.png)