ATOF.3
Upload User: jnzhq888
Upload Date: 2007-01-18
Package Size: 51694k
Code Size: 1k
Category:

OS Develop

Development Platform:

WINDOWS

  1. ." @(#)atof.3 6.1 (Berkeley) 5/15/85
  2. ."
  3. .TH ATOF 3  "May 15, 1985"
  4. .AT 3
  5. .SH NAME
  6. atof, atoi, atol - convert ASCII to numbers
  7. .SH SYNOPSIS
  8. .nf
  9. .ft B
  10. #include <stdlib.h>
  11. double atof(const char *fInptrfP)
  12. int atoi(const char *fInptrfP)
  13. long atol(const char *fInptrfP)
  14. .ft R
  15. .fi
  16. .SH DESCRIPTION
  17. These functions convert a string pointed to by
  18. .I nptr
  19. to floating, integer, and long integer representation respectively.
  20. The first unrecognized character ends the string.
  21. .PP
  22. .B Atof
  23. recognizes an optional string of spaces, then an optional sign, then
  24. a string of digits optionally containing a decimal
  25. point, then an optional `e' or `E' followed by an optionally signed integer.
  26. .PP
  27. .B Atoi
  28. and
  29. .B atol
  30. recognize an optional string of spaces, then an optional sign, then a
  31. string of
  32. digits.
  33. .SH SEE ALSO
  34. .BR strtol (3),
  35. .BR strtod (3),
  36. .BR scanf (3).
  37. .SH BUGS
  38. There are no provisions for overflow.