Appendix B. Data Types
There are different categories of data. For instance, think about the data on an ID card. The card has numbers to store weight, height, date of birth, street address, and postal code. It has words to store a person’s name and city. There’s also image data (a photo) and often an organ donor choice, which is a yes/no decision. In Processing, we have different data types to store each kind of data. Each of the following types is explained in more detail elsewhere in the book, but this is a summary.
Name | Description | Range of values |
int | Integers (whole numbers) | −2,147,483,648 to 2,147,483,647 |
float | Floating-point values | −3.40282347E+38 to 3.40282347E+38 |
boolean | Logical value | true or false |
char | Single character | A–z, 0–9, and symbols ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access