IF Computer > MINERVA > Manual > Reference > Predicates > Type testing > integer/1

integer/1

MINERVA
ifcomputer logo
f
Expert Services on the Web

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.

document: http://www.ifcomputer.co.jp/MINERVA/Manual/Reference/Predicates/type_test/integer/print_en.html
published 2008/10/6 update 1998/8/7 (c) 1996-2006 IF Computer Japan
IF Computer 5-28-2 Sendagi, Bunkyo-ku Tel +81-3-5814-3352 start (AT) ifcomputer.com
Customer Support Tokyo 113-0022 Japan   http://www.ifcomputer.com
Back> managed with ubiCMS