mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-17 02:13:54 +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.
11 lines
223 B
Plaintext
11 lines
223 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(255) = 255
|
|
from_uint(256) = <<out-of-range>>
|
|
from_uint(2147483647) = <<out-of-range>>
|