diff options
Diffstat (limited to 'lib/system/chcks.nim')
-rw-r--r-- | lib/system/chcks.nim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/system/chcks.nim b/lib/system/chcks.nim index d108e09f1..303a8945a 100644 --- a/lib/system/chcks.nim +++ b/lib/system/chcks.nim @@ -46,6 +46,12 @@ proc chckRange64(i, a, b: int64): int64 {.compilerproc.} = else: raiseRangeError(i) +proc chckRangeU(i, a, b: uint64): uint64 {.compilerproc.} = + if i >= a and i <= b: + return i + else: + sysFatal(RangeError, "value out of range") + proc chckRangeF(x, a, b: float): float = if x >= a and x <= b: return x |