type/posint
check for a positive integer
type/negint
check for a negative integer
type/nonnegint
check for a non-negative integer
type/nonposint
check for a non-positive integer
Calling Sequence
Parameters
Description
Supertypes
Examples
type(x, posint)
type(x, negint)
type(x, nonnegint)
type(x, nonposint)
x
-
any expression
The functions type(x, posint), type(x, negint), type(x, nonnegint), and type(x, nonposint) return true if x is a positive, negative, non-negative, or non-positive integer, respectively. Otherwise, false is returned.
type/integer
type3,posint
true
type−5,negint
type0,nonnegint
typex,negint
false
type3.5,posint
type−3,nonposint
See Also
integer
type
type/negative
type/nonnegative
type/nonpositive
type/positive
Download Help Document