70 - Conversions Literals
Conversions between Literals and Elementary Types
-
Decimal and hexadecimal number literals can be implicitly converted to any integer type that is large enough to represent it without truncation
-
Decimal number literals cannot be implicitly converted to fixed-size byte arrays
-
Hexadecimal number literals can be, but only if the number of hex digits exactly fits the size of the bytes type. As an exception both decimal and hexadecimal literals which have a value of zero can be converted to any fixed-size bytes type
-
String literals and hex string literals can be implicitly converted to fixed-size byte arrays, if their number of characters matches the size of the bytes type
- Literals <> Elementary Types
- Decimals/Hex -> Integer
- Decimals X -> Fixed-size byte Arrays
- Hex -> Fixed-size byte arrays
- IFF # Hex Digits Exactly Fits
- String/Hex String -> Fixed-size byte Arrays
- IFF # Chars Exactly Fits