]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) |
2 | .\" | |
93015253 | 3 | .\" %%%LICENSE_START(VERBATIM) |
fea681da MK |
4 | .\" Permission is granted to make and distribute verbatim copies of this |
5 | .\" manual provided the copyright notice and this permission notice are | |
6 | .\" preserved on all copies. | |
7 | .\" | |
8 | .\" Permission is granted to copy and distribute modified versions of this | |
9 | .\" manual under the conditions for verbatim copying, provided that the | |
10 | .\" entire resulting derived work is distributed under the terms of a | |
11 | .\" permission notice identical to this one. | |
c13182ef | 12 | .\" |
fea681da MK |
13 | .\" Since the Linux kernel and libraries are constantly changing, this |
14 | .\" manual page may be incorrect or out-of-date. The author(s) assume no | |
15 | .\" responsibility for errors or omissions, or for damages resulting from | |
16 | .\" the use of the information contained herein. The author(s) may not | |
17 | .\" have taken the same level of care in the production of this manual, | |
18 | .\" which is licensed free of charge, as they might when working | |
19 | .\" professionally. | |
c13182ef | 20 | .\" |
fea681da MK |
21 | .\" Formatted or processed versions of this manual, if unaccompanied by |
22 | .\" the source, must acknowledge the copyright and authors of this work. | |
4b72fb64 | 23 | .\" %%%LICENSE_END |
fea681da MK |
24 | .\" |
25 | .\" References consulted: | |
26 | .\" Linux libc source code | |
27 | .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) | |
28 | .\" 386BSD man pages | |
29 | .\" Modified Mon Mar 29 22:39:24 1993, David Metcalfe | |
30 | .\" Modified Sat Jul 24 21:39:22 1993, Rik Faith (faith@cs.unc.edu) | |
35deeb87 | 31 | .TH ATOF 3 2016-12-12 "GNU" "Linux Programmer's Manual" |
fea681da MK |
32 | .SH NAME |
33 | atof \- convert a string to a double | |
34 | .SH SYNOPSIS | |
35 | .nf | |
36 | .B #include <stdlib.h> | |
68e4db0a | 37 | .PP |
fea681da MK |
38 | .BI "double atof(const char *" nptr ); |
39 | .fi | |
40 | .SH DESCRIPTION | |
60a90ecd MK |
41 | The |
42 | .BR atof () | |
43 | function converts the initial portion of the string | |
6d275e3c MK |
44 | pointed to by \fInptr\fP to |
45 | .IR double . | |
d9bfdb9c | 46 | The behavior is the same as |
ba39b288 | 47 | .PP |
2147452b | 48 | .in +4n |
ba39b288 | 49 | .EX |
13f78d96 | 50 | strtod(nptr, NULL); |
ba39b288 | 51 | .EE |
2147452b | 52 | .in |
ba39b288 | 53 | .PP |
60a90ecd MK |
54 | except that |
55 | .BR atof () | |
56 | does not detect errors. | |
47297adb | 57 | .SH RETURN VALUE |
fea681da | 58 | The converted value. |
b5dedda7 | 59 | .SH ATTRIBUTES |
929a50b5 MK |
60 | For an explanation of the terms used in this section, see |
61 | .BR attributes (7). | |
62 | .TS | |
63 | allbox; | |
64 | lb lb lb | |
65 | l l l. | |
66 | Interface Attribute Value | |
67 | T{ | |
b5dedda7 | 68 | .BR atof () |
929a50b5 MK |
69 | T} Thread safety MT-Safe locale |
70 | .TE | |
47297adb | 71 | .SH CONFORMING TO |
1061db08 | 72 | POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD. |
47297adb | 73 | .SH SEE ALSO |
fea681da MK |
74 | .BR atoi (3), |
75 | .BR atol (3), | |
afaf39e9 | 76 | .BR strfromd (3), |
fea681da MK |
77 | .BR strtod (3), |
78 | .BR strtol (3), | |
79 | .BR strtoul (3) |