![Rust Programming By Example](https://wfqqreader-1252317822.image.myqcloud.com/cover/324/36700324/b_36700324.jpg)
上QQ阅读APP看书,第一时间看更新
Integer types
The following integer types are available in Rust:
![](https://epubservercos.yuewen.com/4498E5/19470399008913506/epubprivate/OEBPS/Images/001.jpg?sign=1739288435-rrzhtPmtvMonyB9oeglAogVitQUZq4Lg-0-c36ab060629da17d67f292b0788a72f5)
The u means unsigned, while the i means signed, and the number following it is the number of bits. For instance, a number of the u8 type can be between 0 and 255, inclusive. And a number of the i16 type can be between -32768 and 32767, inclusive. The size variants are the pointer-sized integer types: usize and isize are 64-bit on a 64-bit CPU. The default integer type is i32, which means that this type will be used by the type inference when it cannot choose a more specific type.