type - Maple Help

type/type

check for type expressions

 Calling Sequence type(a, type)

Parameters

 a - any expression

Description

 • The call type(a, type) checks to see if a is a valid type expression. By definition, a type expression is any expression a for which the command type(expr, a) could succeed.
 • A type defined by the system (such as integer, numeric, and name), a type defined by a procedure (type/a), a type defined by an assignment, or a combination of types are valid type expressions.

Examples

 > $\mathrm{type}\left(\mathrm{integer},\mathrm{type}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(a,\mathrm{type}\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{type}\left(\mathrm{name}=\mathrm{numeric}..\mathrm{numeric},\mathrm{type}\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{mytype}≔\left\{\mathrm{integer},\mathrm{list},\mathrm{name}\right\}$
 ${\mathrm{mytype}}{≔}\left\{{\mathrm{integer}}{,}{\mathrm{list}}{,}{\mathrm{name}}\right\}$ (4)
 > $\mathrm{type}\left(\mathrm{mytype},\mathrm{type}\right)$
 ${\mathrm{true}}$ (5)