verify/type - Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : verify/type

verify/type

verify that a value has a type

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

verify(expr1, expr2, type)

Parameters

expr1, expr2

-

anything

Description

• 

The verify(expr1, expr2, type)  calling sequence returns true if expr2 is a type and expr1 is an expression of that type. That is, if type(expr1, expr2) returns true, then so does this calling sequence.

• 

The verification type is not symmetric.

• 

This calling sequence is useful in structured verifications. Outside of that situation, it is more efficient and clearer to call the type command directly.

• 

If expr2 is not a type, then this command returns false. This is different from calling type(expr1, expr2) directly, which throws an error if expr2 is not a type.

Examples

verify1,2,3,even,odd,as_settype

true

(1)

verify1,3,5,even,odd,as_settype

false

(2)

verify17,not_a_type,type

false

(3)

See Also

type

verify

verify/structured