Constants that have been initialized have a value. Values exist in different types: 70 is an integer, 3.14 is a float, and Z and θ are the type of a character. Characters are Unicode values that take four bytes of memory each. Godzilla is a string of type &str (which is Unicode UTF8 by default), true and false are the type of Boolean values. Integers can be written in different formats:
- Hexadecimal format with 0x, like 0x46 for 70.
- Octal format with 0o, like 0o106 for 70.
- Binary format with 0b, like 0b1000110.
- Underscores can be used for readability, as in 1_000_000. Sometimes the compiler will urge you to indicate more explicitly the type of number with a suffix, for example (the number after u or i is the number of memory bits used, namely: 8, 16, 32, or 64).
- The 10usize denotes an unsigned integer of machine word size (usize), which can...