mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Add gmp_testbit()
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@236114 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
0b63139027
commit
06b19288a6
3 changed files with 122 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- splitted from ./en/functions/gmp.xml, last change in rev 1.1 -->
|
||||
<refentry id="function.gmp-clrbit">
|
||||
<refnamediv>
|
||||
|
@ -46,7 +46,8 @@ echo gmp_strval($a) . "\n";
|
|||
</screen>
|
||||
</example>
|
||||
<para>
|
||||
See also <function>gmp_setbit</function>.
|
||||
See also <function>gmp_setbit</function> and
|
||||
<function>gmp_testbit</functino>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- splitted from ./en/functions/gmp.xml, last change in rev 1.1 -->
|
||||
<refentry id="function.gmp-setbit">
|
||||
<refnamediv>
|
||||
|
@ -49,7 +49,8 @@ echo gmp_strval($a) . "\n";
|
|||
</screen>
|
||||
</example>
|
||||
<para>
|
||||
See also <function>gmp_clrbit</function>.
|
||||
See also <function>gmp_clrbit</function> and
|
||||
<function>gmp_testbit</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
116
reference/gmp/functions/gmp-testbit.xml
Normal file
116
reference/gmp/functions/gmp-testbit.xml
Normal file
|
@ -0,0 +1,116 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<refentry id="function.gmp-testbit">
|
||||
<refnamediv>
|
||||
<refname>gmp_testbit</refname>
|
||||
<refpurpose>Tests if a bit is set</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>gmp_testbit</methodname>
|
||||
<methodparam><type>resource</type><parameter>a</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>index</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Tests if the specified bit is set.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>a</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A GMP number resource
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>index</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The bit to test
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="errors">
|
||||
&reftitle.errors;
|
||||
<para>
|
||||
E_WARNING is issued when <parameter>index<parameter> is less than zero.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>gmp_testbit</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$n = gmp_init("1000000");
|
||||
var_dump(gmp_testbit($n, 1));
|
||||
gmp_setbit($n, 1);
|
||||
var_dump(gmp_testbit($n, 1));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
bool(false)
|
||||
bool(true)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>gmp_setbit</function></member>
|
||||
<member><function>gmp_clrbit</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</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:"../../../../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
|
||||
-->
|
||||
|
Loading…
Reference in a new issue