August 2019
Intermediate to advanced
486 pages
13h 52m
English
Solidity supports signed integer (int) and unsigned integer (uint) data types of various sizes. Based on the size of your data, you can choose from 8- to 256-bit (in steps of 8) data types. For example, for int, you can have int8, int16, int24, and so on, in increments of 8 up to int256. In the same way, you can have uint from uint8, to uint16, uint24, and so on, in increments of 8 up to uint256.
If you use only int/uint in your code, these are aliases of int256/uint256. An int/uint data type is declared and assigned, as shown here:
int varInt = -25; //Signed integer, int is alias of int256uint varUint = 25; //Unsigned integer, uint is alias of uint256
Regardless of the intN or uintN type you are using, its default value ...