Arduino Programming Language: CharCast

Name

char()

Description

Converts a primitive datatype to a numeric character representation. This equivalent to the cast operator (char).

Syntax

char(value)
(char) value

Parameters

  • val: int, long, float, char, byte

Returns

char 

Usage

Application

Examples

char c = char(126); // prints the character ˜
char c = (char) 126; // prints the character ˜


Based on the reference originally written by Arduino Community,  wiring.org.co and  arduino.cc