aboutsummaryrefslogtreecommitdiffstats
path: root/docs/source/lang/api/bitwrite.rst
blob: b3feff235effbb791cde2735a70821f4588f3a5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
.. highlight:: cpp

.. _lang-bitwrite:

bitWrite()
==========

(Macro) Writes a bit of a numeric variable.

Syntax
------

::

   bitWrite(x, n, b)

Parameters
----------

**x**: the numeric variable whose bit to write.

**n**: which bit of the number to write, starting at 0 for the
least-significant (rightmost) bit.

**b**: the value to write to the bit (0 or 1).

Returns
-------

Nothing.

Arduino Compatibility
---------------------

Maple's version of ``bitWrite()`` is compatible with Arduino.

See also
--------

-  :ref:`bit() <lang-bit>`
-  :ref:`bitRead() <lang-bitRead>`
-  :ref:`bitSet() <lang-bitSet>`
-  :ref:`bitClear() <lang-bitClear>`


.. include:: cc-attribution.txt