|
|
|
| Wiring | Processing | |
| int x = 70; // Initialize x = 30; // Change value |
int x = 70; // Initialize x = 30; // Change value |
|
| float x = 70.0; x = 30.0; |
float x = 70.0; x = 30.0; |
|
| int a[8]; // Declare a[0] = 1; // Initialize |
int[] a = new int[8]; // Declare a[0] = 1; // Initialize |
|
| int a[] = {5, 10, 11}; // Declare a[0] = 12; // Reassign |
int[] a = {5, 10, 11}; // Declare a[0] = 12; // Reassign |
|
| Wiring | Processing | |
| void loop() { // Statements } |
void draw() { // Statements } |
|
| for(int a=0; a<=10; a++) { // Statements } |
for(int a=0; a<=10; a++) { // Statements } |
|
| if(c==1) { // Statements } |
if(c==1) { // Statements } |
|
| if(c!=1) { // Statements } |
if(c!=1) { // Statements } |
|
| if(c < 1) { // Statements } |
if(c < 1) { // Statements } |
|
| if(c >= 1) { // Statements } |
if(c >= 1) { // Statements } |
|
| if((c >= 1) && (c < 20)) { // Statements } |
if((c >= 1) && (c < 20)) { // Statements } |
|
|
if(c >= 20) { |
if(c >= 20) { // Statements 1 } else if (c == 0) { // Statements 2 } else { // Statements 3 } |
|
| Wiring | Processing | |
| // Comment | // Comment | |
| void doIt(int x) { // Statements } doIt(x); |
void doIt(int x) { // Statements } doIt(x); |
|
| int square(int x) { return x*x; } square(X); |
int square(int x) { return x*x; } square(X); |
|
| Wiring | Processing | |
| Serial.println("hello world"); | println("hello world"); | |
| int a = 55; Serial.print(a, DEC); |
int a = 55; println(a); |
|
| int a = 55; Serial.print("a is "); Serial.print(a, DEC); |
int a = 55; println("a is " + a); |
|