aboutsummaryrefslogtreecommitdiffstats
path: root/docs/source/lang/api/bitwrite.rst
blob: 6106545d031bcb7ff93e524c53fdd19779b6b455 (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
.. 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 implementation 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:: /arduino-cc-attribution.txt