DEV Community 👩‍💻👨‍💻

Hirokazu Hirono
Hirokazu Hirono

Posted on

Basic Signed Integer Type in Rust

Alt Text

println!("{}", std::i8::MIN); // -128
println!("{}", std::i8::MAX); // 127

Alt Text

println!("{}", std::i16::MIN); // -32768
println!("{}", std::i16::MAX); // 32767

Alt Text

println!("{}", std::i32::MIN); // -2147483648
println!("{}", std::i32::MAX); // 2147483647

Alt Text

println!("{}", std::i64::MIN); // -9223372036854775808
println!("{}", std::i64::MAX); // 9223372036854775807

Top comments (0)

Take Your Github Repository To The Next Level

Take Your Github Repository To The Next Level 🚀️: A step-by-step guide on creating the perfect Github repository.