Numbers

In addition to the default decimal base, CalcSharp also supports number
literals in binary, octal and hexadecimal bases. These numbers must be
preceded by the character '#' followed by 'b', 'o', or 'h'. Range of hexadecimal,
octal and binary numbers depends on NumberSize option.

  8 bits 16 bits 32 bits 64 bits
Decimal -128 to
127
-32,768 to
32,767
-2,147,483,648 to
2,147,483,647
-9,223,372,036,854,775,808 to
9,223,372,036,854,775,807
Hexadecimal #h80 to
#h7F
#h8000 to
#h7FFF
#h80000000 to
#h7FFFFFFF
#h8000000000000000 to
#h7FFFFFFFFFFFFFFF
Octal #o200 to
#o177
#o100000 to
#o77777
#o20000000000 to
#o17777777777
#o1000000000000000000000 to
#o777777777777777777777
Binary #b10000000 to
#b01111111
#b1000000000000000 to
#b0111111111111111
#b10000000000000000000000000000000 to
#b01111111111111111111111111111111
#b1000000000000000000000000000000000000000000000000000000000000000 to
#b0111111111111111111111111111111111111111111111111111111111111111
Predefined variable MIN8 to
MAX8
MIN16 to
MAX16
MIN32 to
MAX32
MIN64 to
MAX64

Table 1. Range of hexadecimal, octal and binary numbers