本参考资料用于Processing 3.0+。 如果你使用的是前一版本,请在使用软件帮助菜单内的参考资料。. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Core Javadoc and Libraries Javadoc.



 char m;

// Declare variable 'm' of type char m = 'A';

// Assign 'm' the value "A"
n = '&


// Declare variable 'n' and assign it the value "&

描述 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.
 char var char var = value 
var variable name referencing the value
value any character
相关 String

Updated on October 2, 2018 05:02:16pm EDT