integer(?term) [ISO]

This type testing predicate succeeds if it's argument is an integer value.  

see also: atom/1 atomic/1 compound/1 float/1 nonvar/1 number/1 var/1

Examples
integer("hello"). fails
integer(-10.1) fails
integer(9). succeeds
integer([a]). fails
X=12, integer(X). succeeds

 

 

info@trinc-prolog.com