tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

pr_cnvtf.rst (838B)


      1 PR_cnvtf
      2 ========
      3 
      4 Converts a floating point number to a string.
      5 
      6 
      7 Syntax
      8 ------
      9 
     10 .. code::
     11 
     12   #include <prdtoa.h>
     13 
     14   void PR_cnvtf (
     15     char *buf,
     16     PRIntn bufsz,
     17     PRIntn prcsn,
     18     PRFloat64 fval);
     19 
     20 
     21 Parameters
     22 ~~~~~~~~~~
     23 
     24 The function has these parameters:
     25 
     26 ``buf``
     27   The address of the buffer in which to store the result.
     28 ``bufsz``
     29   The size of the buffer provided to hold the result.
     30 ``prcsn``
     31   The number of digits of precision to which to generate the floating
     32   point value.
     33 ``fval``
     34   The double-precision floating point number to be converted.
     35 
     36 
     37 Description
     38 -----------
     39 
     40 :ref:`PR_cnvtf` is a simpler interface to convert a floating point number
     41 to a string. It conforms to the ECMA standard of Javascript
     42 (ECMAScript).
     43 
     44 On return, the result is written to the buffer pointed to by ``buf`` of
     45 size ``bufsz``.