didou           Tue Sep 16 21:33:23 2003 EDT

  Modified files:              
    /phpdoc/en/reference/bc/functions   bcadd.xml bcsub.xml 
  Log:
  adding example
  
Index: phpdoc/en/reference/bc/functions/bcadd.xml
diff -u phpdoc/en/reference/bc/functions/bcadd.xml:1.2 
phpdoc/en/reference/bc/functions/bcadd.xml:1.3
--- phpdoc/en/reference/bc/functions/bcadd.xml:1.2      Wed Apr 17 02:36:32 2002
+++ phpdoc/en/reference/bc/functions/bcadd.xml  Tue Sep 16 21:33:22 2003
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
 <!-- splitted from ./en/functions/bc.xml, last change in rev 1.2 -->
   <refentry id="function.bcadd">
    <refnamediv>
@@ -20,6 +20,24 @@
      string.  The optional <parameter>scale</parameter> parameter is
      used to set the number of digits after the decimal place in the
      result.
+    </para>
+    <para>
+     <example>
+      <title><function>bcadd</function> example</title>
+      <programlisting role="php">
+<![CDATA[
+<?php
+
+$a = 1.234;
+$b = 5;
+
+echo bcadd($a, $b);     // 6
+echo bcadd($a, $b, 4);  // 6.2340
+
+?>
+]]>
+      </programlisting>
+     </example>
     </para>
     <para>
      See also <function>bcsub</function>.
Index: phpdoc/en/reference/bc/functions/bcsub.xml
diff -u phpdoc/en/reference/bc/functions/bcsub.xml:1.2 
phpdoc/en/reference/bc/functions/bcsub.xml:1.3
--- phpdoc/en/reference/bc/functions/bcsub.xml:1.2      Wed Apr 17 02:36:34 2002
+++ phpdoc/en/reference/bc/functions/bcsub.xml  Tue Sep 16 21:33:23 2003
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
 <!-- splitted from ./en/functions/bc.xml, last change in rev 1.2 -->
   <refentry id="function.bcsub">
    <refnamediv>
@@ -22,6 +22,24 @@
      string.  The optional <parameter>scale</parameter> parameter is
      used to set the number of digits after the decimal place in the
      result.
+    </para>
+    <para>
+     <example>
+      <title><function>bcsub</function> example</title>
+      <programlisting role="php">
+<![CDATA[
+<?php
+
+$a = 1.234;
+$b = 5;
+ 
+echo bcsub($a, $b);     // -3
+echo bcsub($a, $b, 4);  // -3.7660
+
+?>
+]]>
+      </programlisting>
+     </example>
     </para>
     <para>
      See also <function>bcadd</function>.

Reply via email to