- Learning Rust
- Paul Johnson Vesa Kaihlavirta
- 72字
- 2021-07-02 23:07:15
Signed and unsigned integers
A signed int (one that can have positive or negative values) is defined like this:
let sint = 10i32;
An unsigned int has a u instead of i in the definition:
let usint = 10u32;
Again, these are number literals, and the same declaration can be made via types:
let sint: i32 = 10;
Both signed and unsigned int values can be 8, 16, 32, or 64-bits long.
推薦閱讀
- 精通搜索分析
- Mastering Apache Spark 2.x(Second Edition)
- 可解釋機器學習:模型、方法與實踐
- Learning Vaadin 7(Second Edition)
- Python編程從0到1(視頻教學版)
- Swift Playgrounds少兒趣編程
- C語言程序設計
- PySpark Cookbook
- Mastering openFrameworks:Creative Coding Demystified
- Hands-On GUI Programming with C++ and Qt5
- App Inventor少兒趣味編程動手做
- 從零學Java設計模式
- Python程序設計教程
- 零基礎學Java第2版
- 分布式數據庫HBase案例教程