|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<!-- EN-Revision: 5783476ce3e4e827f85045b7c5c76f966b9acffd Maintainer: aydin Status: ready --> |
| 3 | +<refentry xml:id="function.bcdivmod" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude"> |
| 4 | + <refnamediv> |
| 5 | + <refname>bcdivmod</refname> |
| 6 | + <refpurpose>Keyfi hassasiyetli bir sayının bölümünü ve kalanını verir</refpurpose> |
| 7 | + </refnamediv> |
| 8 | + |
| 9 | + <refsect1 role="description"> |
| 10 | + &reftitle.description; |
| 11 | + <methodsynopsis> |
| 12 | + <type>array</type><methodname>bcdivmod</methodname> |
| 13 | + <methodparam><type>string</type><parameter>sayı1</parameter></methodparam> |
| 14 | + <methodparam><type>string</type><parameter>sayı2</parameter></methodparam> |
| 15 | + <methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>basamak</parameter><initializer>&null;</initializer></methodparam> |
| 16 | + </methodsynopsis> |
| 17 | + <simpara> |
| 18 | + <parameter>sayı1</parameter>'in |
| 19 | + <parameter>sayı2</parameter>'ye bölünmesinden bölümü ve kalanı verir. |
| 20 | + </simpara> |
| 21 | + </refsect1> |
| 22 | + |
| 23 | + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('function.bcdiv')/db:refsect1[@role='parameters'])" /> |
| 24 | + |
| 25 | + <refsect1 role="returnvalues"> |
| 26 | + &reftitle.returnvalues; |
| 27 | + <simpara> |
| 28 | + İlk elemanı <type>string</type> türünde bölüm, ikinci elemanı <type>string</type> türünde kalan olarak indisli bir dizi döner. |
| 29 | + </simpara> |
| 30 | + </refsect1> |
| 31 | + |
| 32 | + <refsect1 role="errors"> |
| 33 | + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('function.bcadd')/db:refsect1[@role='errors']/*)" /> |
| 34 | + <para> |
| 35 | + <parameter>sayı1</parameter> <literal>0</literal> ise |
| 36 | + <exceptionname>DivisionByZeroError</exceptionname> istisnası oluşur. |
| 37 | + </para> |
| 38 | + </refsect1> |
| 39 | + |
| 40 | + <refsect1 role="examples"> |
| 41 | + &reftitle.examples; |
| 42 | + <example> |
| 43 | + <title>- <function>bcdivmod</function> örneği</title> |
| 44 | + <programlisting role="php"> |
| 45 | +<![CDATA[ |
| 46 | +<?php |
| 47 | +bcscale(0); |
| 48 | +
|
| 49 | +[$quot, $rem] = bcdivmod('5', '3'); |
| 50 | +echo $quot; // 1 |
| 51 | +echo $rem; // 2 |
| 52 | +
|
| 53 | +[$quot, $rem] = bcdivmod('5', '-3'); |
| 54 | +echo $quot; // -1 |
| 55 | +echo $rem; // 2 |
| 56 | +
|
| 57 | +[$quot, $rem] = bcdivmod('-5', '3'); |
| 58 | +echo $quot; // -1 |
| 59 | +echo $rem; // -2 |
| 60 | +
|
| 61 | +[$quot, $rem] = bcdivmod('-5', '-3'); |
| 62 | +echo $quot; // 1 |
| 63 | +echo $rem; // -2 |
| 64 | +?> |
| 65 | +]]> |
| 66 | + </programlisting> |
| 67 | + </example> |
| 68 | + <example> |
| 69 | + <title>- Ondalık sayılarla <function>bcdivmod</function></title> |
| 70 | + <programlisting role="php"> |
| 71 | +<![CDATA[ |
| 72 | +<?php |
| 73 | +[$quot, $rem] = bcdivmod('5.7', '1.3', 1); |
| 74 | +echo $quot; // 4 |
| 75 | +echo $rem; // 0.5 |
| 76 | +?> |
| 77 | +]]> |
| 78 | + </programlisting> |
| 79 | + </example> |
| 80 | + </refsect1> |
| 81 | + |
| 82 | + <refsect1 role="seealso"> |
| 83 | + &reftitle.seealso; |
| 84 | + <simplelist> |
| 85 | + <member><function>bcdiv</function></member> |
| 86 | + <member><function>bcmod</function></member> |
| 87 | + <member><methodname>BcMath\Number::divmod</methodname></member> |
| 88 | + </simplelist> |
| 89 | + </refsect1> |
| 90 | +</refentry> |
| 91 | +<!-- Keep this comment at the end of the file |
| 92 | +Local variables: |
| 93 | +mode: sgml |
| 94 | +sgml-omittag:t |
| 95 | +sgml-shorttag:t |
| 96 | +sgml-minimize-attributes:nil |
| 97 | +sgml-always-quote-attributes:t |
| 98 | +sgml-indent-step:1 |
| 99 | +sgml-indent-data:t |
| 100 | +indent-tabs-mode:nil |
| 101 | +sgml-parent-document:nil |
| 102 | +sgml-default-dtd-file:"~/.phpdoc/manual.ced" |
| 103 | +sgml-exposed-tags:nil |
| 104 | +sgml-local-catalogs:nil |
| 105 | +sgml-local-ecat-files:nil |
| 106 | +End: |
| 107 | +vim600: syn=xml fen fdm=syntax fdl=2 si |
| 108 | +vim: et tw=78 syn=sgml |
| 109 | +vi: ts=1 sw=1 |
| 110 | +--> |
0 commit comments