type/name - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

type/name

check for an object of type name

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

type(x, name)

type(x, name(t))

Parameters

x

-

expression

t

-

type

Description

• 

The call type(x, 'name') checks if x is of type name. It returns true if x is of type name. Otherwise, it returns false.

• 

An object is of type name if it is a symbol, or if it is of type indexed and its root is of type name (that is, it is a recursive type).

• 

If the parameter t is included, it checks that x is assigned something of that type.

Examples

type1,'name'

false

(1)

type12,'name'

false

(2)

type0.5,'name'

false

(3)

typeString,'name'

false

(4)

typeName,'name'

true

(5)

typeab,'name'

true

(6)

typeab,'name'

false

(7)

typea,'nameinteger'

false

(8)

a3

a3

(9)

type'a','nameinteger'

true

(10)

See Also

name

type

type/atomic

type/indexed

type/string

type/symbol