adding example

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@140479 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Mehdi Achour 2003-09-17 01:33:23 +00:00
parent bce16a9f4c
commit 3de215b1df
2 changed files with 38 additions and 2 deletions

View file

@ -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>
@ -21,6 +21,24 @@
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>.
</para>

View file

@ -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>
@ -23,6 +23,24 @@
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>.
</para>