Reference×
Reference
- [] (array access)
- = (assign)
- catch
- class
- // (comment)
- , (comma)
- {} (curly braces)
- /** */ (doc comment)
- . (dot)
- draw()
- exit()
- extends
- final
- false
- import
- implements
- loop()
- /* */ (multiline comment)
- new
- noLoop()
- null
- () (parentheses)
- popStyle()
- pop()
- pushStyle()
- push()
- private
- public
- redraw()
- return
- ; (semicolon)
- setLocation()
- setResizable()
- setTitle()
- setup()
- static
- super
- thread()
- this
- try
- void
- true
Name
char
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.
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 "&"
Syntax
char var
char var = value
Parameters
var
variable name referencing the valuevalue
any character
Related

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.