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

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

> 

convert⁡2<3&comma;truefalseFAIL

true

(1)
> 

convert⁡3<2&comma;truefalseFAIL

false

(2)

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

> 

convert⁡1<I&comma;truefalseFAIL

FAIL

(3)

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

> 

convert⁡a<b&comma;truefalseFAIL

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

> 

sort⁡posint&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