hastype
test for a specified type
Calling Sequence
Parameters
Description
Thread Safety
Examples
hastype(expr, t)
hastype(expr, t, 'exclude_container')
expr
-
any expression
t
any Maple type
exclude_container
option
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.
The hastype command is thread-safe as of Maple 15.
For more information on thread safety, see index/threadsafe.
f≔x12⁢y
f≔x⁢y
hastype⁡f,`*`
true
hastype⁡f,`+`
false
hastype⁡f,namefraction
hastype⁡f,radical
hastype⁡f,function
A≔Matrix⁡1,2,3,4
A≔1234
hastype⁡A,rational
hastype⁡A,Matrix
hastype⁡A,Matrix,exclude_container
hastype⁡A,Not⁡numeric
hastype⁡A,Not⁡numeric,exclude_container
hastype⁡F⁡3,identical⁡F
op⁡F⁡3
3
See Also
has
hasfun
membertype
op
type
Download Help Document