hastype - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


hastype

test for a specified type

 

Calling Sequence

Parameters

Description

Thread Safety

Examples

Calling Sequence

hastype(expr, t)

hastype(expr, t, 'exclude_container')

Parameters

expr

-

any expression

t

-

any Maple type

exclude_container

-

option

Description

• 

The hastype(expr, t) function returns true if expr  or any of its subexpressions is of type t.

• 

A subexpression of an expression is any of the expressions returned by the op command.

• 

Using the exclude_container option causes hastype to only look at subexpressions, and not the parent container object.

Thread Safety

• 

The hastype command is thread-safe as of Maple 15.

• 

For more information on thread safety, see index/threadsafe.

Examples

> 

f≔x12⁢y

f≔x⁢y

(1)
> 

hastype⁡f,`*`

true

(2)
> 

hastype⁡f,`+`

false

(3)
> 

hastype⁡f,namefraction

true

(4)
> 

hastype⁡f,radical

true

(5)
> 

hastype⁡f,function

false

(6)
> 

A≔Matrix⁡1,2,3,4

A≔1234

(7)
> 

hastype⁡A,rational

true

(8)
> 

hastype⁡A,Matrix

true

(9)
> 

hastype⁡A,Matrix,exclude_container

false

(10)
> 

hastype⁡A,Not⁡numeric

true

(11)
> 

hastype⁡A,Not⁡numeric,exclude_container

false

(12)
> 

hastype⁡F⁡3,identical⁡F

false

(13)
> 

op⁡F⁡3

3

(14)

See Also

has

hasfun

membertype

op

type