mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 18:03:36 +00:00
library/uint16.m:
library/uint32.m:
library/uint64.m:
library/uint8.m:
Add to each of these modules whichever subset of {from_uint, det_from_uint,
cast_from_uint} makes sense for that module.
tests/hard_coded/from_uint_uint8.{m,exp}:
tests/hard_coded/from_uint_uint16.{m,exp}:
tests/hard_coded/from_uint_uint32.{m,exp}:
Three new test cases to test the changes to uint{8,16,32}.m.
The change to uint64.m will be tested later.
tests/hard_coded/Mmakefile:
Enable the new test cases.
library/string.m:
Add ways to convert strings to uints.
NEWS:
Announce the new predicates and functions.
16 lines
386 B
Plaintext
16 lines
386 B
Plaintext
from_uint(0) = 0
|
|
from_uint(1) = 1
|
|
from_uint(2) = 2
|
|
from_uint(8) = 8
|
|
from_uint(10) = 10
|
|
from_uint(16) = 16
|
|
from_uint(127) = 127
|
|
from_uint(32767) = 32767
|
|
from_uint(32768) = 32768
|
|
from_uint(65534) = 65534
|
|
from_uint(65535) = 65535
|
|
from_uint(65536) = <<out-of-range>>
|
|
from_uint(2147483645) = <<out-of-range>>
|
|
from_uint(2147483647) = <<out-of-range>>
|
|
from_uint(4294967295) = <<out-of-range>>
|