Next: , Previous: , Up: args predefined   [Index]


8.5.5 Validating exact integers

The following bindings are exported by the library (vicare arguments validation).

Validation Clause: exact-integer obj

Succeed if obj satisfies the predicates integer? and exact?.

Validation Clause: exact-integer/false obj

Succeed if obj is #f or it satisfies the predicates integer? and exact?.

Validation Clause: positive-exact-integer obj
Validation Clause: negative-exact-integer obj

Succeed if obj satisfies the predicates integer? and exact? and it is strictly positive or strictly negative.

Validation Clause: non-positive-exact-integer obj
Validation Clause: non-negative-exact-integer obj

Succeed if obj satisfies the predicates integer? and exact? and it is strictly positive or strictly negative.

Validation Clause: exact-integer-in-inclusive-range obj min max
Validation Clause: exact-integer-in-exclusive-range obj min max

Succeed if obj satisfies the predicates integer? and exact? and it is in the specified range. min and max must be exact integers.

Validation Clause: even-exact-integer obj
Validation Clause: odd-exact-integer obj

Succeed if obj satisfies the predicates integer? and exact? and the predicate even? or odd?.