truefalseFAIL - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


convert/truefalseFAIL

convert an expression to a value of type `truefalseFAIL'

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

convert( expr, 'truefalseFAIL' )

Parameters

expr

-

any Maple expression that can be evaluated as a boolean

Description

• 

convert( expr, 'truefalseFAIL' ) attempts to convert the expression expr to one of the values true, false, or FAIL. This is intended to be used in composition with procedures that return a boolean literal that can include the value FAIL.

• 

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.

Examples

convert2<3&comma;&apos;truefalseFAIL&apos;

true

(1)

convert3<2&comma;&apos;truefalseFAIL&apos;

false

(2)

The following conversion returns FAIL because complex numbers are not comparable with <.

convert1<I&comma;&apos;truefalseFAIL&apos;

FAIL

(3)

The following conversion returns an error because the values of a and b are unknown.

converta<b&comma;&apos;truefalseFAIL&apos;

Error, (in `convert/truefalseFAIL`) unable to convert a < b to type `truefalseFAIL'

sortposint&comma;integer&comma;numeric&comma;string&comma;subtype

string&comma;posint&comma;integer&comma;numeric

(4)

Compatibility

• 

The convert/truefalseFAIL command was introduced in Maple 2022.

• 

For more information on Maple 2022 changes, see Updates in Maple 2022.

See Also

convert

evalb

sort

type/boolean

type/truefalseFAIL