2002-04-15 00:12:54 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2007-05-22 14:55:20 +00:00
|
|
|
<!-- $Revision: 1.8 $ -->
|
2002-04-15 00:12:54 +00:00
|
|
|
<!-- splitted from ./en/functions/gmp.xml, last change in rev 1.1 -->
|
|
|
|
<refentry id="function.gmp-clrbit">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>gmp_clrbit</refname>
|
|
|
|
<refpurpose>Clear bit</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<methodsynopsis>
|
2004-02-08 08:46:23 +00:00
|
|
|
<type>void</type><methodname>gmp_clrbit</methodname>
|
2004-11-10 08:30:50 +00:00
|
|
|
<methodparam><type>resource</type><parameter role="reference">a</parameter></methodparam>
|
2002-04-15 00:12:54 +00:00
|
|
|
<methodparam><type>int</type><parameter>index</parameter></methodparam>
|
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
|
|
Clears (sets to 0) bit <parameter>index</parameter> in
|
2004-02-08 08:46:23 +00:00
|
|
|
<parameter>a</parameter>. The index starts at 0.
|
|
|
|
</para>
|
|
|
|
<note>
|
|
|
|
<para>
|
|
|
|
Unlike most of the other GMP functions, <function>gmp_clrbit</function>
|
|
|
|
must be called with a GMP resource that already exists (using
|
|
|
|
<function>gmp_init</function> for example). One will not be
|
|
|
|
automatically created.
|
|
|
|
</para>
|
|
|
|
</note>
|
|
|
|
<example>
|
|
|
|
<title><function>gmp_clrbit</function> example</title>
|
|
|
|
<programlisting role="php">
|
|
|
|
<![CDATA[
|
2004-02-09 03:32:36 +00:00
|
|
|
<?php
|
2004-02-26 11:14:11 +00:00
|
|
|
$a = gmp_init("0xff");
|
|
|
|
gmp_clrbit($a, 0); // index starts at 0, least significant bit
|
|
|
|
echo gmp_strval($a) . "\n";
|
2004-02-09 03:32:36 +00:00
|
|
|
?>
|
2004-02-08 08:46:23 +00:00
|
|
|
]]>
|
|
|
|
</programlisting>
|
|
|
|
<para>
|
|
|
|
The printout of the above program will be:
|
|
|
|
</para>
|
|
|
|
<screen>
|
|
|
|
<![CDATA[
|
|
|
|
254
|
|
|
|
]]>
|
|
|
|
</screen>
|
|
|
|
</example>
|
|
|
|
<para>
|
2007-05-22 14:34:36 +00:00
|
|
|
See also <function>gmp_setbit</function> and
|
2007-05-22 14:55:20 +00:00
|
|
|
<function>gmp_testbit</function>.
|
2002-04-15 00:12:54 +00:00
|
|
|
</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
|
|
|
|
-->
|