type/boolean - Maple Programming Help

Home : Support : Online Help : Programming : Logic : Relations : type checking : type/boolean

type/boolean

check for type Boolean

 Calling Sequence type(expr, boolean)

Parameters

 expr - any expression

Description

 • These functions return true if expr is of the specified type, and false otherwise.
 • An expression is of type boolean if it is of type type/relation, type type/logical or one of the Boolean constants true, false, or FAIL.
 Subtypes

Examples

 > $\mathrm{type}\left(x<5,\mathrm{boolean}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(a\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{or}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{not}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}b,\mathrm{boolean}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{type}\left(1<2\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{and}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}5
 ${\mathrm{true}}$ (3)
 > $\mathrm{type}\left(\mathrm{false},\mathrm{boolean}\right)$
 ${\mathrm{true}}$ (4)