Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 1.16 KB

Conversions Literals.md

File metadata and controls

28 lines (21 loc) · 1.16 KB

Conversions between Literals and Elementary Types

  1. Decimal and hexadecimal number literals can be implicitly converted to any integer type that is large enough to represent it without truncation

  2. Decimal number literals cannot be implicitly converted to fixed-size byte arrays

  3. 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

  4. 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


Slide Screenshot

070.jpg


Slide Deck

  • 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

References