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


8.5.4 Validating fixnums

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

Validation Clause: fixnum obj

Succeed if obj satisfies the predicate fixnum?.

Validation Clause: fixnum/false obj

Succeed if obj is #f or it satisfies the predicate fixnum?.

Validation Clause: positive-fixnum obj
Validation Clause: negative-fixnum obj

Succeed if obj satisfies the predicate fixnum? and it is strictly positive or strictly negative.

Validation Clause: non-positive-fixnum obj
Validation Clause: non-positive-fixnum/false obj

Succeed if obj satisfies the predicate fixnum? and it is zero or positive. The second clause accepts also #f.

Validation Clause: non-negative-fixnum obj
Validation Clause: non-negative-fixnum/false obj

Succeed if obj satisfies the predicate fixnum? and it is zero or negative. The second clause accepts also #f.

Validation Clause: fixnum-index obj

Succeed if obj satisfies the predicate fixnum? and it is zero or positive.

Validation Clause: non-zero-fixnum obj
Validation Clause: non-zero-fixnum/false obj

Fails if obj satisfies the predicate fxzero?. The second clause accepts also #f.

Validation Clause: fixnum-in-inclusive-range obj min max
Validation Clause: fixnum-in-exclusive-range obj min max

Succeed if obj satisfies the predicate fixnum? and it is in the specified range. min and max must be fixnums.

Validation Clause: even-fixnum obj
Validation Clause: odd-fixnum obj

Succeed if obj satisfies the predicate fixnum? and the predicate fxeven? or fxodd?.