| tests whether the argument is an integer.
integer(+Term)
integer/1 succeeds if Term is an integer otherwise it fails.
Arguments
Term term
Examples
| integer(101). |
Succeeds. |
| integer(-5). |
Succeeds.
| | X is 5-3, integer(X). |
Succeeds. |
| integer(12.3). |
Fails. |
| integer(12+3).
| Fails.
|
Standard
This predicate is part of the ISO-Prolog Standard.
See also
atom/1,
atomic/1,
compound/1,
float/1,
nonvar/1,
number/1,
var/1.
|