1  ------------------------------------------------------------------
   2  -- This file was autogenerated by 'writeNumbers', do not modify --
   3  ------------------------------------------------------------------
   4  
   5  package frost.core
   6  
   7  uses frost.unsafe.Pointer
   8  
   9  ===
  10  A 16-bit unsigned integer.
  11  ===
  12  class UInt16 : Value, HashKey<UInt16>, Comparable<UInt16>, Formattable {
  13      @private
  14      class Bits : ListView<Bit> {
  15          def value:UInt16
  16          init(value:UInt16) {
  17              self.value := value
  18          }
  19  
  20          ===Returns a single bit from this number, where index 0 is the least significant bit.===
  21          @override
  22          function [](index:Int):Bit {
  23              return value && (1 << index) != 0
  24          }
  25  
  26          ===
  27          Returns the number of bits in this integer, which is always 16.
  28          ===
  29          @override
  30          function get_count():Int {
  31              return 16
  32          }
  33  
  34          @override
  35          function get_iterator():Iterator<Bit> {
  36              return org.frostlang.frost.IntBitIterator(value.toUInt64, 1 << (16->builtin_uint64 - 1))
  37          }
  38      }
  39      ===
  40      The smallest value this type can hold (0).
  41      ===
  42      constant MIN:UInt16 := 0
  43  
  44      ===
  45      The largest value this type can hold (65,535).
  46      ===
  47      constant MAX:UInt16 := 65535
  48  
  49      @package
  50      def value:builtin_uint16
  51  
  52      ===@hidden===
  53      @implicit
  54      init(value:builtin_uint16) {
  55          self.value := value
  56      }
  57  
  58      ===@hidden===
  59      @implicit
  60      @priority(-4)
  61      init(value:UInt8) {
  62          self.value := value.value->builtin_uint16
  63      }
  64  
  65      ===Adds another number to this number.===
  66      @priority(5)
  67      function +(other:Int16):Int32 {
  68          return value->builtin_int32 + other.value->builtin_int32
  69      }
  70  
  71      ===Adds another number to this number.===
  72      @priority(7)
  73      function +(other:Int32):Int64 {
  74          return value->builtin_int64 + other.value->builtin_int64
  75      }
  76  
  77      ===Adds another number to this number.===
  78      @priority(11)
  79      function +(other:Int):Int64 {
  80          return value->builtin_int64 + other.value->builtin_int64
  81      }
  82  
  83      ===Adds another number to this number.===
  84      @priority(20)
  85      function +(other:UInt16):UInt32 {
  86          return value->builtin_uint32 + other.value->builtin_uint32
  87      }
  88      ===Adds another number to this number.===
  89      @priority(-1)
  90      function +(other:UInt16):UInt16 {
  91          return value + other.value
  92      }
  93  
  94      ===Adds another number to this number.===
  95      @priority(6)
  96      function +(other:UInt32):UInt32 {
  97          return value->builtin_uint32 + other.value
  98      }
  99  
 100      ===Adds another number to this number.===
 101      @priority(8)
 102      function +(other:UInt64):UInt64 {
 103          return value->builtin_uint64 + other.value
 104      }
 105  
 106      ===Adds another number to this number.===
 107      @priority(10)
 108      function +(other:UInt):UInt {
 109          return value->builtin_uint + other.value
 110      }
 111  
 112      ===Adds another number to this number without checking for overflow.===
 113      @priority(5)
 114      function +&(other:Int16):Int32 {
 115          return value->builtin_int32 +& other.value->builtin_int32
 116      }
 117  
 118      ===Adds another number to this number without checking for overflow.===
 119      @priority(7)
 120      function +&(other:Int32):Int64 {
 121          return value->builtin_int64 +& other.value->builtin_int64
 122      }
 123  
 124      ===Adds another number to this number without checking for overflow.===
 125      @priority(11)
 126      function +&(other:Int):Int64 {
 127          return value->builtin_int64 +& other.value->builtin_int64
 128      }
 129  
 130      ===Adds another number to this number without checking for overflow.===
 131      @priority(20)
 132      function +&(other:UInt16):UInt32 {
 133          return value->builtin_uint32 +& other.value->builtin_uint32
 134      }
 135      ===Adds another number to this number without checking for overflow.===
 136      @priority(-1)
 137      function +&(other:UInt16):UInt16 {
 138          return value +& other.value
 139      }
 140  
 141      ===Adds another number to this number without checking for overflow.===
 142      @priority(6)
 143      function +&(other:UInt32):UInt32 {
 144          return value->builtin_uint32 +& other.value
 145      }
 146  
 147      ===Adds another number to this number without checking for overflow.===
 148      @priority(8)
 149      function +&(other:UInt64):UInt64 {
 150          return value->builtin_uint64 +& other.value
 151      }
 152  
 153      ===Adds another number to this number without checking for overflow.===
 154      @priority(10)
 155      function +&(other:UInt):UInt {
 156          return value->builtin_uint +& other.value
 157      }
 158  
 159      ===Subtracts another number from this number.===
 160      @priority(5)
 161      function -(other:Int16):Int32 {
 162          return value->builtin_int32 - other.value->builtin_int32
 163      }
 164  
 165      ===Subtracts another number from this number.===
 166      @priority(7)
 167      function -(other:Int32):Int64 {
 168          return value->builtin_int64 - other.value->builtin_int64
 169      }
 170  
 171      ===Subtracts another number from this number.===
 172      @priority(11)
 173      function -(other:Int):Int64 {
 174          return value->builtin_int64 - other.value->builtin_int64
 175      }
 176  
 177      ===Subtracts another number from this number.===
 178      @priority(20)
 179      function -(other:UInt16):UInt32 {
 180          return value->builtin_uint32 - other.value->builtin_uint32
 181      }
 182      ===Subtracts another number from this number.===
 183      @priority(-1)
 184      function -(other:UInt16):UInt16 {
 185          return value - other.value
 186      }
 187  
 188      ===Subtracts another number from this number.===
 189      @priority(6)
 190      function -(other:UInt32):UInt32 {
 191          return value->builtin_uint32 - other.value
 192      }
 193  
 194      ===Subtracts another number from this number.===
 195      @priority(8)
 196      function -(other:UInt64):UInt64 {
 197          return value->builtin_uint64 - other.value
 198      }
 199  
 200      ===Subtracts another number from this number.===
 201      @priority(10)
 202      function -(other:UInt):UInt {
 203          return value->builtin_uint - other.value
 204      }
 205  
 206      ===Subtracts another number from this number without checking for overflow.===
 207      @priority(5)
 208      function -&(other:Int16):Int32 {
 209          return value->builtin_int32 -& other.value->builtin_int32
 210      }
 211  
 212      ===Subtracts another number from this number without checking for overflow.===
 213      @priority(7)
 214      function -&(other:Int32):Int64 {
 215          return value->builtin_int64 -& other.value->builtin_int64
 216      }
 217  
 218      ===Subtracts another number from this number without checking for overflow.===
 219      @priority(11)
 220      function -&(other:Int):Int64 {
 221          return value->builtin_int64 -& other.value->builtin_int64
 222      }
 223  
 224      ===Subtracts another number from this number without checking for overflow.===
 225      @priority(20)
 226      function -&(other:UInt16):UInt32 {
 227          return value->builtin_uint32 -& other.value->builtin_uint32
 228      }
 229      ===Subtracts another number from this number without checking for overflow.===
 230      @priority(-1)
 231      function -&(other:UInt16):UInt16 {
 232          return value -& other.value
 233      }
 234  
 235      ===Subtracts another number from this number without checking for overflow.===
 236      @priority(6)
 237      function -&(other:UInt32):UInt32 {
 238          return value->builtin_uint32 -& other.value
 239      }
 240  
 241      ===Subtracts another number from this number without checking for overflow.===
 242      @priority(8)
 243      function -&(other:UInt64):UInt64 {
 244          return value->builtin_uint64 -& other.value
 245      }
 246  
 247      ===Subtracts another number from this number without checking for overflow.===
 248      @priority(10)
 249      function -&(other:UInt):UInt {
 250          return value->builtin_uint -& other.value
 251      }
 252  
 253      ===Returns the negation (additive inverse) of this number===
 254      function -():UInt16 {
 255          return UInt16(-value)
 256      }
 257  
 258      ===Multiplies this number by another number.===
 259      @priority(5)
 260      function *(other:Int16):Int32 {
 261          return value->builtin_int32 * other.value->builtin_int32
 262      }
 263  
 264      ===Multiplies this number by another number.===
 265      @priority(7)
 266      function *(other:Int32):Int64 {
 267          return value->builtin_int64 * other.value->builtin_int64
 268      }
 269  
 270      ===Multiplies this number by another number.===
 271      @priority(11)
 272      function *(other:Int):Int64 {
 273          return value->builtin_int64 * other.value->builtin_int64
 274      }
 275  
 276      ===Multiplies this number by another number.===
 277      @priority(20)
 278      function *(other:UInt16):UInt32 {
 279          return value->builtin_uint32 * other.value->builtin_uint32
 280      }
 281      ===Multiplies this number by another number.===
 282      @priority(-1)
 283      function *(other:UInt16):UInt16 {
 284          return value * other.value
 285      }
 286  
 287      ===Multiplies this number by another number.===
 288      @priority(6)
 289      function *(other:UInt32):UInt32 {
 290          return value->builtin_uint32 * other.value
 291      }
 292  
 293      ===Multiplies this number by another number.===
 294      @priority(8)
 295      function *(other:UInt64):UInt64 {
 296          return value->builtin_uint64 * other.value
 297      }
 298  
 299      ===Multiplies this number by another number.===
 300      @priority(10)
 301      function *(other:UInt):UInt {
 302          return value->builtin_uint * other.value
 303      }
 304  
 305      ===Multiplies this number by another number without checking for overflow.===
 306      @priority(5)
 307      function *&(other:Int16):Int32 {
 308          return value->builtin_int32 *& other.value->builtin_int32
 309      }
 310  
 311      ===Multiplies this number by another number without checking for overflow.===
 312      @priority(7)
 313      function *&(other:Int32):Int64 {
 314          return value->builtin_int64 *& other.value->builtin_int64
 315      }
 316  
 317      ===Multiplies this number by another number without checking for overflow.===
 318      @priority(11)
 319      function *&(other:Int):Int64 {
 320          return value->builtin_int64 *& other.value->builtin_int64
 321      }
 322  
 323      ===Multiplies this number by another number without checking for overflow.===
 324      @priority(20)
 325      function *&(other:UInt16):UInt32 {
 326          return value->builtin_uint32 *& other.value->builtin_uint32
 327      }
 328      ===Multiplies this number by another number without checking for overflow.===
 329      @priority(-1)
 330      function *&(other:UInt16):UInt16 {
 331          return value *& other.value
 332      }
 333  
 334      ===Multiplies this number by another number without checking for overflow.===
 335      @priority(6)
 336      function *&(other:UInt32):UInt32 {
 337          return value->builtin_uint32 *& other.value
 338      }
 339  
 340      ===Multiplies this number by another number without checking for overflow.===
 341      @priority(8)
 342      function *&(other:UInt64):UInt64 {
 343          return value->builtin_uint64 *& other.value
 344      }
 345  
 346      ===Multiplies this number by another number without checking for overflow.===
 347      @priority(10)
 348      function *&(other:UInt):UInt {
 349          return value->builtin_uint *& other.value
 350      }
 351  
 352      ===Divides this number by another number, returning the whole number portion.===
 353      @priority(5)
 354      function //(other:Int16):Int32 {
 355          return value->builtin_int32 // other.value->builtin_int32
 356      }
 357  
 358      ===Divides this number by another number, returning the whole number portion.===
 359      @priority(7)
 360      function //(other:Int32):Int64 {
 361          return value->builtin_int64 // other.value->builtin_int64
 362      }
 363  
 364      ===Divides this number by another number, returning the whole number portion.===
 365      @priority(11)
 366      function //(other:Int):Int64 {
 367          return value->builtin_int64 // other.value->builtin_int64
 368      }
 369  
 370      ===Divides this number by another number, returning the whole number portion.===
 371      @priority(20)
 372      function //(other:UInt16):UInt32 {
 373          return value->builtin_uint32 // other.value->builtin_uint32
 374      }
 375      ===Divides this number by another number, returning the whole number portion.===
 376      @priority(-1)
 377      function //(other:UInt16):UInt16 {
 378          return value // other.value
 379      }
 380  
 381      ===Divides this number by another number, returning the whole number portion.===
 382      @priority(6)
 383      function //(other:UInt32):UInt32 {
 384          return value->builtin_uint32 // other.value
 385      }
 386  
 387      ===Divides this number by another number, returning the whole number portion.===
 388      @priority(8)
 389      function //(other:UInt64):UInt64 {
 390          return value->builtin_uint64 // other.value
 391      }
 392  
 393      ===Divides this number by another number, returning the whole number portion.===
 394      @priority(10)
 395      function //(other:UInt):UInt {
 396          return value->builtin_uint // other.value
 397      }
 398  
 399      ===Divides this number by another number, returning the whole number portion, without checking for overflow.===
 400      @priority(5)
 401      function //&(other:Int16):Int32 {
 402          return value->builtin_int32 //& other.value->builtin_int32
 403      }
 404  
 405      ===Divides this number by another number, returning the whole number portion, without checking for overflow.===
 406      @priority(7)
 407      function //&(other:Int32):Int64 {
 408          return value->builtin_int64 //& other.value->builtin_int64
 409      }
 410  
 411      ===Divides this number by another number, returning the whole number portion, without checking for overflow.===
 412      @priority(11)
 413      function //&(other:Int):Int64 {
 414          return value->builtin_int64 //& other.value->builtin_int64
 415      }
 416  
 417      ===Divides this number by another number, returning the whole number portion, without checking for overflow.===
 418      @priority(20)
 419      function //&(other:UInt16):UInt32 {
 420          return value->builtin_uint32 //& other.value->builtin_uint32
 421      }
 422      ===Divides this number by another number, returning the whole number portion, without checking for overflow.===
 423      @priority(-1)
 424      function //&(other:UInt16):UInt16 {
 425          return value //& other.value
 426      }
 427  
 428      ===Divides this number by another number, returning the whole number portion, without checking for overflow.===
 429      @priority(6)
 430      function //&(other:UInt32):UInt32 {
 431          return value->builtin_uint32 //& other.value
 432      }
 433  
 434      ===Divides this number by another number, returning the whole number portion, without checking for overflow.===
 435      @priority(8)
 436      function //&(other:UInt64):UInt64 {
 437          return value->builtin_uint64 //& other.value
 438      }
 439  
 440      ===Divides this number by another number, returning the whole number portion, without checking for overflow.===
 441      @priority(10)
 442      function //&(other:UInt):UInt {
 443          return value->builtin_uint //& other.value
 444      }
 445  
 446      ===Returns the remainder of dividing this number by another number.===
 447      @priority(5)
 448      function %(other:Int16):Int32 {
 449          return value->builtin_int32 % other.value->builtin_int32
 450      }
 451  
 452      ===Returns the remainder of dividing this number by another number.===
 453      @priority(7)
 454      function %(other:Int32):Int64 {
 455          return value->builtin_int64 % other.value->builtin_int64
 456      }
 457  
 458      ===Returns the remainder of dividing this number by another number.===
 459      @priority(11)
 460      function %(other:Int):Int64 {
 461          return value->builtin_int64 % other.value->builtin_int64
 462      }
 463  
 464      ===Returns the remainder of dividing this number by another number.===
 465      @priority(20)
 466      function %(other:UInt16):UInt32 {
 467          return value->builtin_uint32 % other.value->builtin_uint32
 468      }
 469      ===Returns the remainder of dividing this number by another number.===
 470      @priority(-1)
 471      function %(other:UInt16):UInt16 {
 472          return value % other.value
 473      }
 474  
 475      ===Returns the remainder of dividing this number by another number.===
 476      @priority(6)
 477      function %(other:UInt32):UInt32 {
 478          return value->builtin_uint32 % other.value
 479      }
 480  
 481      ===Returns the remainder of dividing this number by another number.===
 482      @priority(8)
 483      function %(other:UInt64):UInt64 {
 484          return value->builtin_uint64 % other.value
 485      }
 486  
 487      ===Returns the remainder of dividing this number by another number.===
 488      @priority(10)
 489      function %(other:UInt):UInt {
 490          return value->builtin_uint % other.value
 491      }
 492  
 493      ===Divides this number by another number.===
 494      @priority(3)
 495      function /(other:Int8):Real32 {
 496          return value->builtin_float32 / other.value->builtin_float32
 497      }
 498  
 499      ===Divides this number by another number.===
 500      @priority(5)
 501      function /(other:Int16):Real32 {
 502          return value->builtin_float32 / other.value->builtin_float32
 503      }
 504  
 505      ===Divides this number by another number.===
 506      @priority(7)
 507      function /(other:Int32):Real32 {
 508          return value->builtin_float32 / other.value->builtin_float32
 509      }
 510  
 511      ===Divides this number by another number.===
 512      @priority(9)
 513      function /(other:Int64):Real64 {
 514          return value->builtin_float64 / other.value->builtin_float64
 515      }
 516  
 517      ===Divides this number by another number.===
 518      @priority(2)
 519      function /(other:UInt8):Real32 {
 520          return value->builtin_float32 / other.value->builtin_float32
 521      }
 522  
 523      ===Divides this number by another number.===
 524      @priority(20)
 525      function /(other:UInt16):Real32 {
 526          return value->builtin_float32 / other.value->builtin_float32
 527      }
 528  
 529      ===Divides this number by another number.===
 530      @priority(6)
 531      function /(other:UInt32):Real32 {
 532          return value->builtin_float32 / other.value->builtin_float32
 533      }
 534  
 535      ===Divides this number by another number.===
 536      @priority(8)
 537      function /(other:UInt64):Real64 {
 538          return value->builtin_float64 / other.value->builtin_float64
 539      }
 540  
 541      ===Divides this number by another number.===
 542      @priority(12)
 543      function /(other:Real32):Real32 {
 544          return value->builtin_float32 / other.value
 545      }
 546  
 547      ===Divides this number by another number.===
 548      @priority(13)
 549      function /(other:Real64):Real64 {
 550          return value->builtin_float64 / other.value
 551      }
 552  
 553      ===Returns the bitwise NOT of this number.===
 554      function !!():UInt16 {
 555          return UInt16(!!value)
 556      }
 557  
 558      ===Returns the bitwise AND of this number with another number.===
 559      @priority(5)
 560      function &&(other:Int16):Int32 {
 561          return value->builtin_int32 && other.value->builtin_int32
 562      }
 563  
 564      ===Returns the bitwise AND of this number with another number.===
 565      @priority(7)
 566      function &&(other:Int32):Int32 {
 567          return value->builtin_int32 && other.value
 568      }
 569  
 570      ===Returns the bitwise AND of this number with another number.===
 571      @priority(9)
 572      function &&(other:Int64):Int64 {
 573          return value->builtin_int64 && other.value
 574      }
 575  
 576      ===Returns the bitwise AND of this number with another number.===
 577      @priority(11)
 578      function &&(other:Int):Int {
 579          return value->builtin_int && other.value
 580      }
 581  
 582      ===Returns the bitwise AND of this number with another number.===
 583      @priority(20)
 584      function &&(other:UInt16):UInt32 {
 585          return value->builtin_uint32 && other.value->builtin_uint32
 586      }
 587      ===Returns the bitwise AND of this number with another number.===
 588      @priority(-1)
 589      function &&(other:UInt16):UInt16 {
 590          return value && other.value
 591      }
 592  
 593      ===Returns the bitwise AND of this number with another number.===
 594      @priority(6)
 595      function &&(other:UInt32):UInt32 {
 596          return value->builtin_uint32 && other.value
 597      }
 598  
 599      ===Returns the bitwise AND of this number with another number.===
 600      @priority(8)
 601      function &&(other:UInt64):UInt64 {
 602          return value->builtin_uint64 && other.value
 603      }
 604  
 605      ===Returns the bitwise AND of this number with another number.===
 606      @priority(10)
 607      function &&(other:UInt):UInt {
 608          return value->builtin_uint && other.value
 609      }
 610  
 611      ===Returns the bitwise OR of this number with another number.===
 612      @priority(5)
 613      function ||(other:Int16):Int32 {
 614          return value->builtin_int32 || other.value->builtin_int32
 615      }
 616  
 617      ===Returns the bitwise OR of this number with another number.===
 618      @priority(7)
 619      function ||(other:Int32):Int32 {
 620          return value->builtin_int32 || other.value
 621      }
 622  
 623      ===Returns the bitwise OR of this number with another number.===
 624      @priority(9)
 625      function ||(other:Int64):Int64 {
 626          return value->builtin_int64 || other.value
 627      }
 628  
 629      ===Returns the bitwise OR of this number with another number.===
 630      @priority(11)
 631      function ||(other:Int):Int {
 632          return value->builtin_int || other.value
 633      }
 634  
 635      ===Returns the bitwise OR of this number with another number.===
 636      @priority(20)
 637      function ||(other:UInt16):UInt32 {
 638          return value->builtin_uint32 || other.value->builtin_uint32
 639      }
 640      ===Returns the bitwise OR of this number with another number.===
 641      @priority(-1)
 642      function ||(other:UInt16):UInt16 {
 643          return value || other.value
 644      }
 645  
 646      ===Returns the bitwise OR of this number with another number.===
 647      @priority(6)
 648      function ||(other:UInt32):UInt32 {
 649          return value->builtin_uint32 || other.value
 650      }
 651  
 652      ===Returns the bitwise OR of this number with another number.===
 653      @priority(8)
 654      function ||(other:UInt64):UInt64 {
 655          return value->builtin_uint64 || other.value
 656      }
 657  
 658      ===Returns the bitwise OR of this number with another number.===
 659      @priority(10)
 660      function ||(other:UInt):UInt {
 661          return value->builtin_uint || other.value
 662      }
 663  
 664      ===Returns the bitwise XOR of this number with another number.===
 665      @priority(5)
 666      function ~~(other:Int16):Int32 {
 667          return value->builtin_int32 ~~ other.value->builtin_int32
 668      }
 669  
 670      ===Returns the bitwise XOR of this number with another number.===
 671      @priority(7)
 672      function ~~(other:Int32):Int32 {
 673          return value->builtin_int32 ~~ other.value
 674      }
 675  
 676      ===Returns the bitwise XOR of this number with another number.===
 677      @priority(9)
 678      function ~~(other:Int64):Int64 {
 679          return value->builtin_int64 ~~ other.value
 680      }
 681  
 682      ===Returns the bitwise XOR of this number with another number.===
 683      @priority(11)
 684      function ~~(other:Int):Int {
 685          return value->builtin_int ~~ other.value
 686      }
 687  
 688      ===Returns the bitwise XOR of this number with another number.===
 689      @priority(20)
 690      function ~~(other:UInt16):UInt32 {
 691          return value->builtin_uint32 ~~ other.value->builtin_uint32
 692      }
 693      ===Returns the bitwise XOR of this number with another number.===
 694      @priority(-1)
 695      function ~~(other:UInt16):UInt16 {
 696          return value ~~ other.value
 697      }
 698  
 699      ===Returns the bitwise XOR of this number with another number.===
 700      @priority(6)
 701      function ~~(other:UInt32):UInt32 {
 702          return value->builtin_uint32 ~~ other.value
 703      }
 704  
 705      ===Returns the bitwise XOR of this number with another number.===
 706      @priority(8)
 707      function ~~(other:UInt64):UInt64 {
 708          return value->builtin_uint64 ~~ other.value
 709      }
 710  
 711      ===Returns the bitwise XOR of this number with another number.===
 712      @priority(10)
 713      function ~~(other:UInt):UInt {
 714          return value->builtin_uint ~~ other.value
 715      }
 716  
 717      ===Returns this number shifted left by the specified number of bits.===
 718      @priority(20)
 719      function <<(other:UInt16):UInt32 {
 720          return value->builtin_uint32 << other.value->builtin_uint32
 721      }
 722      ===Returns this number shifted left by the specified number of bits.===
 723      @priority(-1)
 724      function <<(other:UInt16):UInt16 {
 725          return value << other.value
 726      }
 727  
 728      ===Returns this number shifted left by the specified number of bits, without checking for overflow.===
 729      @priority(20)
 730      function <<&(other:UInt16):UInt32 {
 731          return value->builtin_uint32 <<& other.value->builtin_uint32
 732      }
 733      ===Returns this number shifted left by the specified number of bits, without checking for overflow.===
 734      @priority(-1)
 735      function <<&(other:UInt16):UInt16 {
 736          return value <<& other.value
 737      }
 738  
 739      ===Returns this number logical shifted right by the specified number of bits.===
 740      @priority(20)
 741      function >>(other:UInt16):UInt32 {
 742          return value->builtin_uint32 >> other.value->builtin_uint32
 743      }
 744      ===Returns this number logical shifted right by the specified number of bits.===
 745      @priority(-1)
 746      function >>(other:UInt16):UInt16 {
 747          return value >> other.value
 748      }
 749  
 750      ===Returns `true` if this number is equal to the given number.===
 751      @priority(3)
 752      function =(other:Int8):Bit {
 753          return value->builtin_int32 = other.value->builtin_int32
 754      }
 755  
 756      ===Returns `true` if this number is equal to the given number.===
 757      @priority(5)
 758      function =(other:Int16):Bit {
 759          return value->builtin_int32 = other.value->builtin_int32
 760      }
 761  
 762      ===Returns `true` if this number is equal to the given number.===
 763      @priority(7)
 764      function =(other:Int32):Bit {
 765          return value->builtin_int64 = other.value->builtin_int64
 766      }
 767  
 768      ===Returns `true` if this number is equal to the given number.===
 769      @priority(11)
 770      function =(other:Int):Bit {
 771          return value->builtin_int64 = other.value->builtin_int64
 772      }
 773  
 774      ===Returns `true` if this number is equal to the given number.===
 775      @priority(2)
 776      function =(other:UInt8):Bit {
 777          return value = other.value->builtin_uint16
 778      }
 779  
 780      ===Returns `true` if this number is equal to the given number.===
 781      @override
 782      @priority(20)
 783      function =(other:UInt16):Bit {
 784          return value = other.value
 785      }
 786  
 787      ===Returns `true` if this number is equal to the given number.===
 788      @priority(6)
 789      function =(other:UInt32):Bit {
 790          return value->builtin_uint32 = other.value
 791      }
 792  
 793      ===Returns `true` if this number is equal to the given number.===
 794      @priority(8)
 795      function =(other:UInt64):Bit {
 796          return value->builtin_uint64 = other.value
 797      }
 798  
 799      ===Returns `true` if this number is equal to the given number.===
 800      @priority(10)
 801      function =(other:UInt):Bit {
 802          return value->builtin_uint = other.value
 803      }
 804  
 805      ===Returns `true` if this number is not equal to the given number.===
 806      @priority(3)
 807      function !=(other:Int8):Bit {
 808          return value->builtin_int32 != other.value->builtin_int32
 809      }
 810  
 811      ===Returns `true` if this number is not equal to the given number.===
 812      @priority(5)
 813      function !=(other:Int16):Bit {
 814          return value->builtin_int32 != other.value->builtin_int32
 815      }
 816  
 817      ===Returns `true` if this number is not equal to the given number.===
 818      @priority(7)
 819      function !=(other:Int32):Bit {
 820          return value->builtin_int64 != other.value->builtin_int64
 821      }
 822  
 823      ===Returns `true` if this number is not equal to the given number.===
 824      @priority(11)
 825      function !=(other:Int):Bit {
 826          return value->builtin_int64 != other.value->builtin_int64
 827      }
 828  
 829      ===Returns `true` if this number is not equal to the given number.===
 830      @priority(2)
 831      function !=(other:UInt8):Bit {
 832          return value != other.value->builtin_uint16
 833      }
 834  
 835      ===Returns `true` if this number is not equal to the given number.===
 836      @override
 837      @priority(20)
 838      function !=(other:UInt16):Bit {
 839          return value != other.value
 840      }
 841  
 842      ===Returns `true` if this number is not equal to the given number.===
 843      @priority(6)
 844      function !=(other:UInt32):Bit {
 845          return value->builtin_uint32 != other.value
 846      }
 847  
 848      ===Returns `true` if this number is not equal to the given number.===
 849      @priority(8)
 850      function !=(other:UInt64):Bit {
 851          return value->builtin_uint64 != other.value
 852      }
 853  
 854      ===Returns `true` if this number is not equal to the given number.===
 855      @priority(10)
 856      function !=(other:UInt):Bit {
 857          return value->builtin_uint != other.value
 858      }
 859  
 860      ===Returns `true` if this number is less than the given number.===
 861      @priority(3)
 862      function <(other:Int8):Bit {
 863          return value->builtin_int32 < other.value->< other.value->builtin_int32
 864      }
 865  
 866      ===Returns `true` if this number is less than the given number.===
 867      @priority(5)
 868      function <(other:Int16):Bit {
 869          return value->builtin_int32 < other.value->< other.value->builtin_int32
 870      }
 871  
 872      ===Returns `true` if this number is less than the given number.===
 873      @priority(7)
 874      function <(other:Int32):Bit {
 875          return value->builtin_int64 < other.value->< other.value->builtin_int64
 876      }
 877  
 878      ===Returns `true` if this number is less than the given number.===
 879      @priority(11)
 880      function <(other:Int):Bit {
 881          return value->builtin_int64 < other.value->< other.value->builtin_int64
 882      }
 883  
 884      ===Returns `true` if this number is less than the given number.===
 885      @priority(2)
 886      function <(other:UInt8):Bit {
 887          return value < other.value->< other.value->builtin_uint16
 888      }
 889  
 890      ===Returns `true` if this number is less than the given number.===
 891      @override
 892      @priority(20)
 893      function <(other:UInt16):Bit {
 894          return value < other.value
 895      }< other.value
 896      }
 897  
 898      ===Returns `true` if this number is less than the given number.===
 899      @priority(6)
 900      function <(other:UInt32):Bit {
 901          return value->builtin_uint32 < other.value
 902      }< other.value
 903      }
 904  
 905      ===Returns `true` if this number is less than the given number.===
 906      @priority(8)
 907      function <(other:UInt64):Bit {
 908          return value->builtin_uint64 < other.value
 909      }< other.value
 910      }
 911  
 912      ===Returns `true` if this number is less than the given number.===
 913      @priority(10)
 914      function <(other:UInt):Bit {
 915          return value->builtin_uint < other.value
 916      }< other.value
 917      }
 918  
 919      ===Returns `true` if this number is greater than the given number.===
 920      @priority(3)
 921      function >(other:Int8):Bit {
 922          return value->builtin_int32 > other.value->builtin_int32
 923      }
 924  
 925      ===Returns `true` if this number is greater than the given number.===
 926      @priority(5)
 927      function >(other:Int16):Bit {
 928          return value->builtin_int32 > other.value->builtin_int32
 929      }
 930  
 931      ===Returns `true` if this number is greater than the given number.===
 932      @priority(7)
 933      function >(other:Int32):Bit {
 934          return value->builtin_int64 > other.value->builtin_int64
 935      }
 936  
 937      ===Returns `true` if this number is greater than the given number.===
 938      @priority(11)
 939      function >(other:Int):Bit {
 940          return value->builtin_int64 > other.value->builtin_int64
 941      }
 942  
 943      ===Returns `true` if this number is greater than the given number.===
 944      @priority(2)
 945      function >(other:UInt8):Bit {
 946          return value > other.value->builtin_uint16
 947      }
 948  
 949      ===Returns `true` if this number is greater than the given number.===
 950      @override
 951      @priority(20)
 952      function >(other:UInt16):Bit {
 953          return value > other.value
 954      }
 955  
 956      ===Returns `true` if this number is greater than the given number.===
 957      @priority(6)
 958      function >(other:UInt32):Bit {
 959          return value->builtin_uint32 > other.value
 960      }
 961  
 962      ===Returns `true` if this number is greater than the given number.===
 963      @priority(8)
 964      function >(other:UInt64):Bit {
 965          return value->builtin_uint64 > other.value
 966      }
 967  
 968      ===Returns `true` if this number is greater than the given number.===
 969      @priority(10)
 970      function >(other:UInt):Bit {
 971          return value->builtin_uint > other.value
 972      }
 973  
 974      ===Returns `true` if this number is greater than or equal to the given number.===
 975      @priority(3)
 976      function >=(other:Int8):Bit {
 977          return value->builtin_int32 >= other.value->builtin_int32
 978      }
 979  
 980      ===Returns `true` if this number is greater than or equal to the given number.===
 981      @priority(5)
 982      function >=(other:Int16):Bit {
 983          return value->builtin_int32 >= other.value->builtin_int32
 984      }
 985  
 986      ===Returns `true` if this number is greater than or equal to the given number.===
 987      @priority(7)
 988      function >=(other:Int32):Bit {
 989          return value->builtin_int64 >= other.value->builtin_int64
 990      }
 991  
 992      ===Returns `true` if this number is greater than or equal to the given number.===
 993      @priority(11)
 994      function >=(other:Int):Bit {
 995          return value->builtin_int64 >= other.value->builtin_int64
 996      }
 997  
 998      ===Returns `true` if this number is greater than or equal to the given number.===
 999      @priority(2)
1000      function >=(other:UInt8):Bit {
1001          return value >= other.value->builtin_uint16
1002      }
1003  
1004      ===Returns `true` if this number is greater than or equal to the given number.===
1005      @override
1006      @priority(20)
1007      function >=(other:UInt16):Bit {
1008          return value >= other.value
1009      }
1010  
1011      ===Returns `true` if this number is greater than or equal to the given number.===
1012      @priority(6)
1013      function >=(other:UInt32):Bit {
1014          return value->builtin_uint32 >= other.value
1015      }
1016  
1017      ===Returns `true` if this number is greater than or equal to the given number.===
1018      @priority(8)
1019      function >=(other:UInt64):Bit {
1020          return value->builtin_uint64 >= other.value
1021      }
1022  
1023      ===Returns `true` if this number is greater than or equal to the given number.===
1024      @priority(10)
1025      function >=(other:UInt):Bit {
1026          return value->builtin_uint >= other.value
1027      }
1028  
1029      ===Returns `true` if this number is less than or equal to the given number.===
1030      @priority(3)
1031      function <=(other:Int8):Bit {
1032          return value->builtin_int32 <= other.value->builtin_int32
1033      }
1034  
1035      ===Returns `true` if this number is less than or equal to the given number.===
1036      @priority(5)
1037      function <=(other:Int16):Bit {
1038          return value->builtin_int32 <= other.value->builtin_int32
1039      }
1040  
1041      ===Returns `true` if this number is less than or equal to the given number.===
1042      @priority(7)
1043      function <=(other:Int32):Bit {
1044          return value->builtin_int64 <= other.value->builtin_int64
1045      }
1046  
1047      ===Returns `true` if this number is less than or equal to the given number.===
1048      @priority(11)
1049      function <=(other:Int):Bit {
1050          return value->builtin_int64 <= other.value->builtin_int64
1051      }
1052  
1053      ===Returns `true` if this number is less than or equal to the given number.===
1054      @priority(2)
1055      function <=(other:UInt8):Bit {
1056          return value <= other.value->builtin_uint16
1057      }
1058  
1059      ===Returns `true` if this number is less than or equal to the given number.===
1060      @override
1061      @priority(20)
1062      function <=(other:UInt16):Bit {
1063          return value <= other.value
1064      }
1065  
1066      ===Returns `true` if this number is less than or equal to the given number.===
1067      @priority(6)
1068      function <=(other:UInt32):Bit {
1069          return value->builtin_uint32 <= other.value
1070      }
1071  
1072      ===Returns `true` if this number is less than or equal to the given number.===
1073      @priority(8)
1074      function <=(other:UInt64):Bit {
1075          return value->builtin_uint64 <= other.value
1076      }
1077  
1078      ===Returns `true` if this number is less than or equal to the given number.===
1079      @priority(10)
1080      function <=(other:UInt):Bit {
1081          return value->builtin_uint <= other.value
1082      }
1083      ===Returns a list of all integers in the given range. The list is 'lazy', meaning that it does not actually allocate memory to hold the entire list.===
1084      @class
1085      function [](range:Range<UInt16>):ListView<UInt16> {
1086          return org.frostlang.frost.UInt16List(SteppedRange<UInt16, UInt16>(range.min, range.max, 1, range.inclusive))
1087      }
1088      ===Returns a list of all integers in the given stepped range. The list is 'lazy', meaning that it does not actually allocate memory to hold the entire list.===
1089      @class
1090      function [](range:SteppedRange<UInt16, UInt16>):ListView<UInt16> {
1091          return org.frostlang.frost.UInt16List(range)
1092      }
1093      ===
1094      A view of this number as a collection of bits, with `bits[0]` as the least significant bit.
1095      ===
1096      property bits:ListView<Bit>
1097      function get_bits():ListView<Bit> { return Bits(self) }
1098  
1099      ===The square root of this number.===
1100      property sqrt:Real32
1101      function get_sqrt():Real32 {
1102          return toReal32.sqrt
1103      }
1104  
1105      ===Returns the smaller (closest to negative infinity) of this number and another number.===
1106      @priority(3)
1107      function min(other:Int8):Int32 {
1108          if value->builtin_int32 < other.value->< other.value->builtin_int32 {
1109              return value->builtin_int32
1110          }
1111          return other.value->builtin_int32
1112      }
1113  
1114      ===Returns the smaller (closest to negative infinity) of this number and another number.===
1115      @priority(5)
1116      function min(other:Int16):Int32 {
1117          if value->builtin_int32 < other.value->< other.value->builtin_int32 {
1118              return value->builtin_int32
1119          }
1120          return other.value->builtin_int32
1121      }
1122  
1123      ===Returns the smaller (closest to negative infinity) of this number and another number.===
1124      @priority(7)
1125      function min(other:Int32):Int64 {
1126          if value->builtin_int64 < other.value->< other.value->builtin_int64 {
1127              return value->builtin_int64
1128          }
1129          return other.value->builtin_int64
1130      }
1131  
1132  
1133      ===Returns the smaller (closest to negative infinity) of this number and another number.===
1134      @priority(11)
1135      function min(other:Int):Int64 {
1136          if value->builtin_int64 < other.value->< other.value->builtin_int64 {
1137              return value->builtin_int64
1138          }
1139          return other.value->builtin_int64
1140      }
1141  
1142      ===Returns the smaller (closest to negative infinity) of this number and another number.===
1143      @priority(2)
1144      function min(other:UInt8):UInt16 {
1145          if value < other.value->< other.value->builtin_uint16 {
1146              return value
1147          }
1148          return other.value->builtin_uint16
1149      }
1150  
1151      ===Returns the smaller (closest to negative infinity) of this number and another number.===
1152      @priority(20)
1153      function min(other:UInt16):UInt16 {
1154          if value < other.value {< other.value {
1155              return value
1156          }
1157          return other.value
1158      }
1159  
1160      ===Returns the smaller (closest to negative infinity) of this number and another number.===
1161      @priority(6)
1162      function min(other:UInt32):UInt32 {
1163          if value->builtin_uint32 < other.value {< other.value {
1164              return value->builtin_uint32
1165          }
1166          return other.value
1167      }
1168  
1169      ===Returns the smaller (closest to negative infinity) of this number and another number.===
1170      @priority(8)
1171      function min(other:UInt64):UInt64 {
1172          if value->builtin_uint64 < other.value {< other.value {
1173              return value->builtin_uint64
1174          }
1175          return other.value
1176      }
1177  
1178      ===Returns the smaller (closest to negative infinity) of this number and another number.===
1179      @priority(10)
1180      function min(other:UInt):UInt {
1181          if value->builtin_uint < other.value {< other.value {
1182              return value->builtin_uint
1183          }
1184          return other.value
1185      }
1186  
1187      ===Returns the larger (closest to positive infinity) of this number and another number.===
1188      @priority(3)
1189      function max(other:Int8):Int32 {
1190          if value->builtin_int32 > other.value->builtin_int32 {
1191              return value->builtin_int32
1192          }
1193          return other.value->builtin_int32
1194      }
1195  
1196      ===Returns the larger (closest to positive infinity) of this number and another number.===
1197      @priority(5)
1198      function max(other:Int16):Int32 {
1199          if value->builtin_int32 > other.value->builtin_int32 {
1200              return value->builtin_int32
1201          }
1202          return other.value->builtin_int32
1203      }
1204  
1205      ===Returns the larger (closest to positive infinity) of this number and another number.===
1206      @priority(7)
1207      function max(other:Int32):Int64 {
1208          if value->builtin_int64 > other.value->builtin_int64 {
1209              return value->builtin_int64
1210          }
1211          return other.value->builtin_int64
1212      }
1213  
1214  
1215      ===Returns the larger (closest to positive infinity) of this number and another number.===
1216      @priority(11)
1217      function max(other:Int):Int64 {
1218          if value->builtin_int64 > other.value->builtin_int64 {
1219              return value->builtin_int64
1220          }
1221          return other.value->builtin_int64
1222      }
1223  
1224      ===Returns the larger (closest to positive infinity) of this number and another number.===
1225      @priority(2)
1226      function max(other:UInt8):UInt16 {
1227          if value > other.value->builtin_uint16 {
1228              return value
1229          }
1230          return other.value->builtin_uint16
1231      }
1232  
1233      ===Returns the larger (closest to positive infinity) of this number and another number.===
1234      @priority(20)
1235      function max(other:UInt16):UInt16 {
1236          if value > other.value {
1237              return value
1238          }
1239          return other.value
1240      }
1241  
1242      ===Returns the larger (closest to positive infinity) of this number and another number.===
1243      @priority(6)
1244      function max(other:UInt32):UInt32 {
1245          if value->builtin_uint32 > other.value {
1246              return value->builtin_uint32
1247          }
1248          return other.value
1249      }
1250  
1251      ===Returns the larger (closest to positive infinity) of this number and another number.===
1252      @priority(8)
1253      function max(other:UInt64):UInt64 {
1254          if value->builtin_uint64 > other.value {
1255              return value->builtin_uint64
1256          }
1257          return other.value
1258      }
1259  
1260      ===Returns the larger (closest to positive infinity) of this number and another number.===
1261      @priority(10)
1262      function max(other:UInt):UInt {
1263          if value->builtin_uint > other.value {
1264              return value->builtin_uint
1265          }
1266          return other.value
1267      }
1268  
1269      @override
1270      function get_hash():Int {
1271          return Int(value->builtin_int)
1272      }
1273  
1274      ===The number of `1` bits in this number's binary representation.===
1275      property bitCount:UInt16
1276      @external(frostUInt16_get_bitCount)
1277      function get_bitCount():UInt16
1278  
1279      ===Parses a string as a number in the specified radix. Returns `null` if the parse fails.===
1280      @class
1281      @pre(radix >= 2 & radix <= 36)
1282      function parse(str:String, radix:Int):UInt16? {
1283          def result := Frost.parse(str, radix)
1284          if result == null {
1285              return null
1286          }
1287          return result.asUInt16
1288      }
1289  
1290      ===
1291      This number converted to an Int.
1292      ===
1293      property asInt:Int
1294      function get_asInt():Int {
1295          return Int(value->builtin_int)
1296      }
1297  
1298      ===
1299      This number converted to an Int.
1300      ===
1301      property toInt:Int
1302      function get_toInt():Int {
1303          return Int(value->builtin_int)
1304      }
1305  
1306      ===
1307      This number truncated to an 8 bit signed number.
1308      If this number is not in the range of an 8 bit signed number, a safety violation occurs.
1309      ===
1310      property asInt8:Int8
1311      function get_asInt8():Int8 {
1312      assert self <= Int8.MAX.toUInt16, "UInt16(\{self}) cannot be safely converted to Int8"
1313          return Int8(value->builtin_int8)
1314      }
1315  
1316      ===
1317      This number truncated to an 8 bit signed number.
1318      This function never fails, even if the number is not in the range of an 8 bit signed number.
1319      ===
1320      property toInt8:Int8
1321      function get_toInt8():Int8 {
1322          return Int8(value->builtin_int8)
1323      }
1324  
1325      ===
1326      This number reinterpreted as a 16 bit signed number.
1327      If this number is not in the range of a 16 bit signed number, a safety violation occurs.
1328      ===
1329      property asInt16:Int16
1330      function get_asInt16():Int16 {
1331      assert self <= Int16.MAX.toUInt16, "UInt16(\{self}) cannot be safely converted to Int16"
1332          return Int16(value->builtin_int16)
1333      }
1334  
1335      ===
1336      This number reinterpreted as a 16 bit signed number.
1337      This function never fails, even if the number is not in the range of a 16 bit signed number.
1338      ===
1339      property toInt16:Int16
1340      function get_toInt16():Int16 {
1341          return Int16(value->builtin_int16)
1342      }
1343  
1344      ===
1345      This number zero extended to a 32 bit signed number.
1346      ===
1347      property asInt32:Int32
1348      function get_asInt32():Int32 {
1349          return Int32(value->builtin_int32)
1350      }
1351  
1352      ===
1353      This number zero extended to a 32 bit signed number.
1354      ===
1355      property toInt32:Int32
1356      function get_toInt32():Int32 {
1357          return Int32(value->builtin_int32)
1358      }
1359  
1360      ===
1361      This number zero extended to a 64 bit signed number.
1362      ===
1363      property asInt64:Int64
1364      function get_asInt64():Int64 {
1365          return Int64(value->builtin_int64)
1366      }
1367  
1368      ===
1369      This number zero extended to a 64 bit signed number.
1370      ===
1371      property toInt64:Int64
1372      function get_toInt64():Int64 {
1373          return Int64(value->builtin_int64)
1374      }
1375  
1376      ===
1377      This number converted to a UInt.
1378      ===
1379      property asUInt:UInt
1380      function get_asUInt():UInt {
1381          return UInt(value->builtin_uint)
1382      }
1383  
1384      ===
1385      This number converted to a UInt.
1386      ===
1387      property toUInt:UInt
1388      function get_toUInt():UInt {
1389          return UInt(value->builtin_uint)
1390      }
1391  
1392      ===
1393      This number truncated to an 8 bit unsigned number.
1394      If this number is not in the range of an 8 bit unsigned number, a safety violation occurs.
1395      ===
1396      property asUInt8:UInt8
1397      function get_asUInt8():UInt8 {
1398      assert self <= UInt8.MAX.toUInt16, "UInt16(\{self}) cannot be safely converted to UInt8"
1399          return UInt8(value->builtin_uint8)
1400      }
1401  
1402      ===
1403      This number truncated to an 8 bit unsigned number.
1404      This function never fails, even if the number is not in the range of an 8 bit unsigned number.
1405      ===
1406      property toUInt8:UInt8
1407      function get_toUInt8():UInt8 {
1408          return UInt8(value->builtin_uint8)
1409      }
1410  
1411      ===
1412      This number zero extended to a 32 bit unsigned number.
1413      ===
1414      property asUInt32:UInt32
1415      function get_asUInt32():UInt32 {
1416          return UInt32(value->builtin_uint32)
1417      }
1418  
1419      ===
1420      This number zero extended to a 32 bit unsigned number.
1421      ===
1422      property toUInt32:UInt32
1423      function get_toUInt32():UInt32 {
1424          return UInt32(value->builtin_uint32)
1425      }
1426  
1427      ===
1428      This number zero extended to a 64 bit unsigned number.
1429      ===
1430      property asUInt64:UInt64
1431      function get_asUInt64():UInt64 {
1432          return UInt64(value->builtin_uint64)
1433      }
1434  
1435      ===
1436      This number zero extended to a 64 bit unsigned number.
1437      ===
1438      property toUInt64:UInt64
1439      function get_toUInt64():UInt64 {
1440          return UInt64(value->builtin_uint64)
1441      }
1442  
1443      ===
1444      This number converted to a 32 bit floating point number.
1445      ===
1446      property asReal32:Real32
1447      function get_asReal32():Real32 {
1448          return Real32(value->builtin_float32)
1449      }
1450  
1451      ===
1452      This number converted to a 32 bit floating point number.
1453      ===
1454      property toReal32:Real32
1455      function get_toReal32():Real32 {
1456          return Real32(value->builtin_float32)
1457      }
1458  
1459      ===
1460      This number converted to a 64 bit floating point number.
1461      ===
1462      property asReal64:Real64
1463      function get_asReal64():Real64 {
1464          return Real64(value->builtin_float64)
1465      }
1466  
1467      ===
1468      This number converted to a 64 bit floating point number.
1469      ===
1470      property toReal64:Real64
1471      function get_toReal64():Real64 {
1472          return Real64(value->builtin_float64)
1473      }
1474  
1475      ===Returns this number converted to a decimal string.===
1476      @override
1477      function get_toString():String {
1478          constant max := 5
1479          def chars := Pointer<Char8>.alloc(max)
1480          var index := max - 1
1481          var value := self
1482          if value >= 0 {
1483              do {
1484                  chars[index] := Char8((value % 10 + 48).asUInt8)
1485                  value := (value // 10).asUInt16
1486                  index -= 1
1487              }
1488              while value > 0
1489              index += 1
1490          }
1491          else {
1492              do {
1493                  chars[index] := Char8((48 - value % 10).asUInt8)
1494                  value := (value // 10).asUInt16
1495                  index -= 1
1496              }
1497              while value < 0< 0
1498              chars[index] := "-"
1499          }
1500          def size := max - index
1501          for i in 0 .. size {
1502              chars[i] := chars[i + index]
1503          }
1504          return String(chars, size)
1505      }
1506  
1507      === Returns a formatted representation of this number. Supported format strings are `""`, `"d"`, or `"D"` for decimal, `"b"` or `"B"` for binary, `"o"` or `"O"` for octal, `"x"` for lowercase hexadecimal, and `"X"` for uppercase hexadecimal. ===
1508      @override
1509      function format(fmt:String):String {
1510          return Frost.format(false, self.toUInt64, 0xFFFF, fmt)
1511      }
1512  }
1513