RosettaCodeData/Task/Literals-Integer/Rust/literals-integer.rs

8 lines
273 B
XML

10 // Decimal
0b10 // Binary
0x10 // Hexadecimal
0o10 // Octal
1_000 // Underscores may appear anywhere in the numeric literal for clarity
10_i32 // The type (in this case i32, a 32-bit signed integer) may also be appended.
10i32 // With or without underscores