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