strtodConverts a character string to a floating-point number | ||||||||||||||
Arguments
Return ValueThe result of converting the input string pointed to by s to a double-precision value is returned. If the value exceeds the range that can be expressed, either +HUGE_VAL(1.797693134862316e+308) or -HUGE_VAL is returned according to the sign. 0 is returned if an underflow occurs.ExplanationThe character string pointed to by s is converted to a double-precision floating point number and its value is returned. The string pointed to by s must be in one of the following formats.[ws][sn][ddd] [ws] White space (can be omitted) [sn] Sign (can be omitted) [ddd] Number string (can be omitted) strtod() stops conversion when a character is encountered that cannot be converted. A pointer to the character that terminated the conversion is placed at the storage location specified by endp unless endp is NULL. NotesError processing is shown in the following table:
See Alsoatof() |