Compares the variable on the left with the value or variable on the right of the operator. Returns true when the operand on the left is greater (bigger) than or equal to the operand on the right. Please note that you may compare variables of different data types, but that could generate unpredictable results, it is therefore recommended to compare variables of the same data type including the signed/unsigned type.
x >= y; // is true if x is bigger than or equal to y and it is false if x is smaller than y
- x: variable. Allowed data types: int, float, double, byte, short, long.
- y: variable or constant. Allowed data types: int, float, double, byte, short, long.
The result on Serial Monitor:
※ NOTES AND WARNINGS:
Positive numbers are greater than negative numbers.
- Language : == (equal to)
- Language : > (greater than)
- Language : < (less than)
- Language : ≤ (less than or equal to)
- Language : != (not equal to)
※ ARDUINO BUY RECOMMENDATION
|Arduino UNO R3|
|Arduino Starter Kit|