BAP Online Manuals : Library Reference : Library by Name : integer
Previous: hostexec
Next: is

6.2.73. integer

tests whether the type of the argument is integer

SYNOPSIS

integer(Term)

SYNTAX

 integer(Term) (i)

ARGUMENTS

void(Term) (i) Term to be tested.

DESCRIPTION

This is a standard prolog built-in. Integer() succeeds if its argument is unbound or currently bound to an integer.

NOTE: This implementation differs to that of Clocksin/Mellish for their integer predicate would fail if the Term is unbound. To get the usual behaviour, you have to use a bound (Term),integer(Term) combination!

EXAMPLE

read(X),
( atom(X), write("Atom"),nl ;
  integer(X), write("Integer"),nl
).

ERRORS

No runtime errors.

LAYERS

prolog-process, client-server, object

RELATED PREDICATES

atom , string , char


BAP Online Manuals : Library Reference : Library by Name : integer
Previous: hostexec
Next: is