TypeTools - Maple Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Programming : Data Types : Type Checking : TypeTools : TypeTools/Exists

TypeTools

 Exists
 check whether a type exists in the TypeTools database

 Calling Sequence Exists(typename)

Parameters

 typename - symbol; name of the type

Description

 • The Exists command returns true if a type is associated with the name typename via the TypeTools package, and false otherwise.
 • Note that the Exists command does not check whether a name is the name of a valid type, since built-in types and types created by assigning to the name type/typename are not recognized.
 • To determine whether a name is the name of a valid type, use type( typename, 'type' ).

Examples

 > $\mathrm{TypeTools}[\mathrm{AddType}]\left('\mathrm{tff}','\left\{\mathrm{identical}\left(\mathrm{true}\right),\mathrm{identical}\left(\mathrm{false}\right),\mathrm{identical}\left(\mathrm{FAIL}\right)\right\}'\right)$
 > $\mathrm{TypeTools}[\mathrm{Exists}]\left('\mathrm{tff}'\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{TypeTools}[\mathrm{Exists}]\left('\mathrm{no_such_type__}'\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{TypeTools}[\mathrm{Exists}]\left('\mathrm{integer}'\right)$
 ${\mathrm{false}}$ (3)
 > $\mathrm{type}\left('\mathrm{integer}','\mathrm{type}'\right)$
 ${\mathrm{true}}$ (4)

 See Also

## Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam