check for an object of type integer - Maple Help

Online Help

All Products    Maple    MapleSim


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

type/integer - check for an object of type integer

Calling Sequence

type(x, integer)

type(x, integer[n])

type(x, integer[a..b])

Parameters

x

-

any expression

n

-

1, 2, 4, or 8

a, b

-

integers with ab

Description

• 

The type(x, integer) function returns true if x is a Maple integer.

• 

If the type is provided with a single integer index n, then type(expr, integer[n]) returns true if, and only if, n is one of 1, 2, 4, or 8, and expr is an integer representable as a signed n-byte hardware integer.

• 

The call type(expr, integer[a .. b ]) returns true if, and only if, expr is an integer satisfying the inequalities aexpr and exprb, where a and b are integers with ab.

Examples

type1,integer

true

(1)

type12,integer

false

(2)

type0.5,integer

false

(3)

typeString,integer

false

(4)

typeName,integer

false

(5)

typeab,integer

false

(6)

typeab,integer

false

(7)

type200,integer1

false

(8)

type300,integer1

false

(9)

type300,integer2

true

(10)

type5,integer1..10

true

(11)

type5,integer6..10

false

(12)

type5.0,integer1..10

false

(13)

maptype,129,128,127,128,integer1

false,true,true,false

(14)

See Also

integer, type, type/atomic, type/even, type/literal, type/numeric, type/odd, type/rational


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam