mirror of
https://github.com/php/doc-es.git
synced 2026-03-26 16:32:13 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@336867 c90b9560-bf6c-de11-be94-00142212c4b1
107 lines
2.8 KiB
XML
107 lines
2.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: fad0f5afbabffce803df9d592d72ad8c9151c19f Maintainer: agarzon Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<refentry xml:id="function.bccomp" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>bccomp</refname>
|
|
<refpurpose>Compara dos números de precisión arbitraria</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>int</type><methodname>bccomp</methodname>
|
|
<methodparam><type>string</type><parameter>left_operand</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>right_operand</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>scale</parameter><initializer>int</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Compara el <parameter>left_operand</parameter> al
|
|
<parameter>right_operand</parameter> y devuelve como resultado un
|
|
entero.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>left_operand</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
El left operand, como una cadena.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>right_operand</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
El right operand, como una cadena.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>scale</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
El parametro optativo <parameter>scale</parameter> es usado para indicar
|
|
el número de dígitos decimales que se utilizarán en la comparación.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Devuelve 0 si los dos operandos son iguales, 1 si el
|
|
<parameter>left_operand</parameter> es mayor que el
|
|
<parameter>right_operand</parameter>, de lo contrario -1.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<example>
|
|
<title>Ejemplo<function>bccomp</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
echo bccomp('1', '2') . "\n"; // -1
|
|
echo bccomp('1.00001', '1', 3); // 0
|
|
echo bccomp('1.00001', '1', 5); // 1
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|