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≔x12y
f≔xy
hastypef,`*`
true
hastypef,`+`
false
hastypef,namefraction
hastypef,radical
hastypef,function
A≔Matrix1,2,3,4
A≔1234
hastypeA,rational
hastypeA,Matrix
hastypeA,Matrix,exclude_container
hastypeA,Notnumeric
hastypeA,Notnumeric,exclude_container
hastypeF3,identicalF
opF3
3
See Also
has
hasfun
membertype
op
type
Download Help Document