মূল বিষয়বস্তুতে যান
Back to Reference
Concepts

Data types and overflow

Why int behaves differently on the Uno and the ESP32.

TypeArduino UnoESP32
int16-bit: −32 768 … 32 76732-bit: about ±2.1 billion
long32-bit32-bit
unsigned long0 … 4 294 967 295same
byte / uint8_t0 … 255same
float / double32-bit (double = float!)float 32-bit, double 64-bit
On the Uno, int a = 32767; a++; gives −32768. The simulator reproduces this exactly, so code that works here behaves the same on the board.