首页 > 文档 > char字符
2017
07-15

char字符

Name Char字符
Examples char m; // Declare variable ‘m’ of type char

m = ‘A’; // Assign ‘m’ the value “A”

int n = ‘&’; // Declare variable ‘n’ and assign it the value “&”

Description Datatype for characters, typographic symbols such as A, d, and $. A char stores letters and symbols in the Unicode format, a coding system developed to support a variety of world languages. Each char is two bytes (16 bits) in length and is distinguished by surrounding it with single quotes. Character escapes may also stored as a char. For example, the representation for the “delete” key is 127. The first time a variable is written, it must be declared with a statement expressing its datatype. Subsequent uses of this variable must not reference the datatype because Processing will think the variable is being declared again.

字符的数据类型、版式符号 ( ad $)char unicode 格式存储字母和符号, 它是为支持各种世界语言而开发的编码系统。每个 char 是两个字节 (16 ) 的长度, 并通过围绕它与单引号。字符转义符也可以存储为 char。例如, “删除键的表示形式为127。第一次写入变量时, 必须用表达其数据类型的语句声明它。此变量的后续使用不能引用该数据类型, 因为处理将认为该变量正在再次声明。

Syntax语法 char var

char var = value

Parameters

参数

var variable name referencing the value
引用值的变量名
value any character
Related

相关

String


最后编辑:
作者:卡萨布兰卡
卡萨布兰卡
这个作者貌似有点懒,什么都没有留下。

留下一个回复

你的email不会被公开。