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


8.5.9 Validating C language int values

Exact integers in the range of the C language type int are used often when interfacing with a foreign C language library; the library (vicare platform words) provides the predicate signed-int? to validated such values; words predicates for details.

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

Validation Clause: signed-int obj

Succeed if obj satisfies the predicate signed-int?.

Validation Clause: signed-int/false obj

Succeed if obj is #f or it satisfies the predicate signed-int?.

Validation Clause: positive-signed-int obj
Validation Clause: negative-signed-int obj

Succeed if obj satisfies the predicate signed-int? and it is strictly positive or strictly negative.

Validation Clause: non-positive-signed-int obj
Validation Clause: non-negative-signed-int obj

Succeed if obj satisfies the predicate signed-int? and it is strictly positive or strictly negative.

Validation Clause: signed-int-in-inclusive-range obj min max
Validation Clause: signed-int-in-exclusive-range obj min max

Succeed if obj satisfies the predicate signed-int? and it is in the specified range. min and max must be exact integers.

Validation Clause: even-signed-int obj
Validation Clause: odd-signed-int obj

Succeed if obj satisfies the predicate signed-int? and the predicate even? or odd?.