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

.. _lang-charcast:

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

Description
-----------

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:: cc-attribution.txt