type/character - Maple Programming Help

Home : Support : Online Help : Programming : Data Types : Type Checking : Types : type/character

type/character

check for an object of type character

 Calling Sequence type( expr, 'character' )

Parameters

 expr - expression

Description

 • The type( expr, 'character' ) command verifies if expr is of type character. It returns true if expr is of type character, and false otherwise. A character is defined as a string with length equal to one.

Examples

 > $\mathrm{type}\left(2.3,'\mathrm{character}'\right)$
 ${\mathrm{false}}$ (1)
 > $\mathrm{type}\left("f",'\mathrm{character}'\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{type}\left("foo",'\mathrm{character}'\right)$
 ${\mathrm{false}}$ (3)
 > $\mathrm{type}\left(a,'\mathrm{character}'\right)$
 ${\mathrm{false}}$ (4)
 > $\mathrm{type}\left("",'\mathrm{character}'\right)$
 ${\mathrm{false}}$ (5)