jeroen          Sat Sep  1 10:54:09 2001 EDT

  Modified files:              
    /phpdoc/en/functions        math.xml 
  Log:
  Implemented user-notes to round()
  
  
Index: phpdoc/en/functions/math.xml
diff -u phpdoc/en/functions/math.xml:1.50 phpdoc/en/functions/math.xml:1.51
--- phpdoc/en/functions/math.xml:1.50   Sun Aug 19 07:47:37 2001
+++ phpdoc/en/functions/math.xml        Sat Sep  1 10:54:08 2001
@@ -1,5 +1,5 @@
 <?xml encoding="iso-8859-1"?>
-<!-- $Revision: 1.50 $ -->
+<!-- $Revision: 1.51 $ -->
  <reference id="ref.math">
   <title>Mathematical Functions</title>
   <titleabbrev>Math</titleabbrev>
@@ -1126,13 +1126,28 @@
      Returns the rounded value of <parameter>val</parameter> to
      specified <parameter>precision</parameter> 
      (number of digits after the decimal point).
+     <parameter>precision</parameter> can also be negative or zero (default).
+    </para>
+    <para>
+     <caution>
+      <simpara>
+       PHP doesn't handle strings like <literal>"12,300.2"</literal> correctly
+       by default. See <link linkend="language.types.string.conversion"
+       >converting from strings</link>.
+      </simpara>
+     </caution>
+    </para>
+    <para>
      <informalexample>
       <programlisting role="php">
-$foo = round (3.4);  // $foo == 3.0
-$foo = round (3.5);  // $foo == 4.0
-$foo = round (3.6);  // $foo == 4.0
+$foo = round(3.4);  // $foo == 3.0
+$foo = round(3.5);  // $foo == 4.0
+$foo = round(3.6);  // $foo == 4.0
+$foo = round(3.6, 0);  // equivalent with above
+
+$foo = round(1.95583, 2);  // $foo == 1.96
 
-$foo = round (1.95583, 2);  // $foo == 1.96
+$foo = round(1241757, -3);  // $foo == 1242000
       </programlisting>
      </informalexample>
     </para>
@@ -1262,5 +1277,7 @@
 sgml-local-catalogs:nil
 sgml-local-ecat-files:nil
 End:
-vim: ts=1 sw=1 et syntax=sgml
+vim600: syn=xml
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
 -->


Reply via email to