Mercurial > hg > Members > kono > nitros9-code
view docs/ccguide/atof.refentry @ 1331:0a3500c747de
Fixed ANOTHER bug
author | boisy |
---|---|
date | Sun, 07 Sep 2003 00:53:51 +0000 |
parents | 1f4a17c1c56d |
children |
line wrap: on
line source
<refentry id="atof"> <refnamediv> <refname>Atof</refname> <refname>Atoi</refname> <refname>Atol</refname> <refpurpose>ASCII to number conversions</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> <funcdef>double <function>atof</function></funcdef> <paramdef>char *<parameter>ptr</parameter></paramdef> </funcprototype> <funcprototype> <funcdef>long <function>atol</function></funcdef> <paramdef>char *<parameter>ptr</parameter></paramdef> </funcprototype> <funcprototype> <funcdef>int <function>atoi</function></funcdef> <paramdef>char *<parameter>ptr</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1><title>Description</title> <para> Conversions of the string pointed to by "ptr" to the relevant number type are carried out by these functions. They cease to convert a number when the first unrecognized character is encountered. </para> <para> Each skips leading spaces and tab characters. Atof() recognizes an optional sign followed by a digit string that could possibly contain a decimal point, then an optional "e" or "E", and optional sign and a digit string. Atol() and atoi() recognize an optional sign and a digit string. </para> </refsect1> <refsect1><title>Caveats</title> <para> Overflow causes unpredictable results. There are no error indications. </para> </refsect1> </refentry>