Questo sito non è ne attivo ne aggiornato, specialmente la pagina del download รจ ferma a 5 vesioni fa , utilizzate il sito in inglese finchè questo sito non sarà annunciato ufficialmente
Reference Language (extended) | Libraries | Comparison | Board
These can be used inside the condition of an if statement.
True only if both operands are true, e.g.
if (digitalRead(2) == 1 && digitalRead(3) == 1) { // read two switches
// ...
}
is true only if x is 1, 2, 3, or 4.
True if either operand is true, e.g.
if (x > 0 || y > 0) {
// ...
}
is true if either x or y is greater than 0.
True if the operand is false, e.g.
if (!x) {
// ...
}
is true if x is false (i.e. if x equals 0).
Make sure you don't mistake the boolean AND operator, && (double ampersand) for the bitwise AND operator & (single ampersand). They are entirely different beasts.
Similarly, do not confuse the boolean || (double pipe) operator with the bitwise OR operator | (single pipe).
The bitwise not ~ (tilde) looks much different than the boolean not ! (exclamation point or "bang" as the programmers say) but you still have to be sure which one you want where.
if (a >= 10 && a <= 20){} // true if a is between 10 and 20
Puoi postare correzioni, suggerimenti, e nuova documentazione nel Forum.
I contenuti della guida di riferimento sono distribiuti con licenza Creative Commons Attribution-ShareAlike 3.0 License. Gli esempi di codice nella guida di riferimento sono di pubblico dominio.