aboutsummaryrefslogtreecommitdiffstats
path: root/docs/source/lang/cpp/charcast.rst
blob: 640ad858ae754a2b54981c1571383e031d7df593 (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
.. highlight:: cpp

.. _lang-charcast:

``char()`` (cast)
=================

Converts a value to the :ref:`char <lang-char>` data type.

Syntax
------

``char(x)``

Parameters
----------

**x**: a value of any type

Returns
-------

The value, converted to a ``char``.  Note, however, that if the value
is outside the range of a ``char`` (-128 to 127), then the results
might be strange and unexpected.

See Also
--------

-  :ref:`char <lang-char>`

.. include:: /arduino-cc-attribution.txt