convert/truefalse
convert an expression to a value of type `truefalse'
Calling Sequence
Parameters
Description
Examples
convert( expr, 'truefalse' )
expr
-
any Maple expression that can be evaluated as a boolean
The function convert( expr, 'truefalse' ) attempts to convert the expression expr to one of the two values true and false. This is intended to be used in composition with procedures that return a boolean literal that can include the value FAIL. The value FAIL is replaced by the value false.
The argument expression expr must be an expression that can be evaluated as a boolean, resulting in one of the values true, false, or FAIL. If evalb⁡expr returns true, then the conversion also returns the value true. Otherwise, the conversion returns the value false.
convert⁡true,truefalse
true
convert⁡false,truefalse
false
convert⁡FAIL,truefalse
convert⁡2<3,truefalse
convert⁡a<b,truefalse
Error, (in `convert/truefalse`) unable to convert a < b to type `truefalse'
sort⁡posint,integer,numeric,string,subtype
string,posint,integer,numeric
sort⁡posint,integer,numeric,string,rcurry⁡convert,truefalse@subtype
See Also
convert
evalb
sort
type/boolean
type/truefalse
Download Help Document