type/posint - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Data Types : Type Checking : Types : type/posnegint

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

Calling Sequence

type(x, posint)

type(x, negint)

type(x, nonnegint)

type(x, nonposint)

Parameters

x

-

any expression

Description

• 

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.

Supertypes

• 

type/integer

Examples

type3,posint

true

(1)

type5,negint

true

(2)

type0,nonnegint

true

(3)

typex,negint

false

(4)

type3.5,posint

false

(5)

type3,nonposint

true

(6)

See Also

integer

type

type/integer

type/negative

type/nonnegative

type/nonpositive

type/positive