Type - Maple Help

# Online Help

###### All Products    Maple    MapleSim

TypeTools

 Type
 test whether an expression is of the given type

 Calling Sequence Type(e, t)

Parameters

 e - any expression t - type

Description

 • The Type command tests whether the expression e is of the type t. This command is identical to the top-level type command. For information about this command, see type.

Examples

 > $\mathrm{TypeTools}\left[\mathrm{Type}\right]\left(7,'\mathrm{integer}'\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{TypeTools}\left[\mathrm{Type}\right]\left(\frac{2}{3},'\mathrm{integer}'\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{TypeTools}\left[\mathrm{Type}\right]\left(\left[2.3,5.6,8.9\right],'\mathrm{list}\left(\mathrm{float}\right)'\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{TypeTools}\left[\mathrm{Type}\right]\left(2{x}^{7}+3x+1,'\mathrm{polynom}\left(\mathrm{integer}\right)'\right)$
 ${\mathrm{true}}$ (4)

 See Also