strtoflt128.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 2010-2017 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.2 or
  6. any later version published by the Free Software Foundation; with no
  7. Invariant Sections, with the Front-Cover Texts being "A GNU Manual,"
  8. and with the Back-Cover Texts as in (a) below. A copy of the
  9. license is included in the section entitled "GNU Free Documentation
  10. License."
  11. (a) The FSF's Back-Cover Text is: "You have the freedom to
  12. copy and modify this GNU manual. -->
  13. <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
  14. <head>
  15. <title>GCC libquadmath: strtoflt128</title>
  16. <meta name="description" content="GCC libquadmath: strtoflt128">
  17. <meta name="keywords" content="GCC libquadmath: strtoflt128">
  18. <meta name="resource-type" content="document">
  19. <meta name="distribution" content="global">
  20. <meta name="Generator" content="makeinfo">
  21. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  22. <link href="index.html#Top" rel="start" title="Top">
  23. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  24. <link href="I_002fO-Library-Routines.html#I_002fO-Library-Routines" rel="up" title="I/O Library Routines">
  25. <link href="quadmath_005fsnprintf.html#quadmath_005fsnprintf" rel="next" title="quadmath_snprintf">
  26. <link href="I_002fO-Library-Routines.html#I_002fO-Library-Routines" rel="prev" title="I/O Library Routines">
  27. <style type="text/css">
  28. <!--
  29. a.summary-letter {text-decoration: none}
  30. blockquote.smallquotation {font-size: smaller}
  31. div.display {margin-left: 3.2em}
  32. div.example {margin-left: 3.2em}
  33. div.indentedblock {margin-left: 3.2em}
  34. div.lisp {margin-left: 3.2em}
  35. div.smalldisplay {margin-left: 3.2em}
  36. div.smallexample {margin-left: 3.2em}
  37. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  38. div.smalllisp {margin-left: 3.2em}
  39. kbd {font-style:oblique}
  40. pre.display {font-family: inherit}
  41. pre.format {font-family: inherit}
  42. pre.menu-comment {font-family: serif}
  43. pre.menu-preformatted {font-family: serif}
  44. pre.smalldisplay {font-family: inherit; font-size: smaller}
  45. pre.smallexample {font-size: smaller}
  46. pre.smallformat {font-family: inherit; font-size: smaller}
  47. pre.smalllisp {font-size: smaller}
  48. span.nocodebreak {white-space:nowrap}
  49. span.nolinebreak {white-space:nowrap}
  50. span.roman {font-family:serif; font-weight:normal}
  51. span.sansserif {font-family:sans-serif; font-weight:normal}
  52. ul.no-bullet {list-style: none}
  53. -->
  54. </style>
  55. </head>
  56. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  57. <a name="strtoflt128"></a>
  58. <div class="header">
  59. <p>
  60. Next: <a href="quadmath_005fsnprintf.html#quadmath_005fsnprintf" accesskey="n" rel="next">quadmath_snprintf</a>, Up: <a href="I_002fO-Library-Routines.html#I_002fO-Library-Routines" accesskey="u" rel="up">I/O Library Routines</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
  61. </div>
  62. <hr>
  63. <a name="strtoflt128-_002d_002d_002d-Convert-from-string"></a>
  64. <h3 class="section">3.1 <code>strtoflt128</code> &mdash; Convert from string</h3>
  65. <p>The function <code>strtoflt128</code> converts a string into a
  66. <code>__float128</code> number.
  67. </p>
  68. <dl compact="compact">
  69. <dt>Syntax</dt>
  70. <dd><p><code>__float128 strtoflt128 (const char *s, char **sp)</code>
  71. </p>
  72. </dd>
  73. <dt><em>Arguments</em>:</dt>
  74. <dd><table>
  75. <tr><td width="15%"><var>s</var></td><td width="70%">input string</td></tr>
  76. <tr><td width="15%"><var>sp</var></td><td width="70%">the address of the next character in the string</td></tr>
  77. </table>
  78. <p>The argument <var>sp</var> contains, if not <code>NULL</code>, the address of the
  79. next character following the parts of the string, which have been read.
  80. </p>
  81. </dd>
  82. <dt>Example</dt>
  83. <dd><div class="smallexample">
  84. <pre class="smallexample">#include &lt;quadmath.h&gt;
  85. int main ()
  86. {
  87. __float128 r;
  88. r = strtoflt128 (&quot;1.2345678&quot;, NULL);
  89. return 0;
  90. }
  91. </pre></div>
  92. </dd>
  93. </dl>
  94. </body>
  95. </html>