type/suffixed - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

type/suffixed

check for a symbol with a given suffix

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

type(x, suffixed(y))

type(x, suffixed(y, stype))

Parameters

x

-

any expression

y

-

symbol, string, or set or list of either symbols or strings

stype

-

type

Description

• 

A call to type suffixed with one parameter checks whether a symbol or string x has the same type as y, and x begins with the characters of y.

• 

With two parameters, x is checked to see if it has the same type of and begins with the characters of y and that the balance, when parsed, is of type stype.

• 

If y is a set or  list, then x is checked against each operand of y.

• 

Note that x and "x" are considered to be of type suffixed(x) and suffixed("x"), respectively.  Also note that parse will automatically simplify the balance, so "x6/2" and "x4!" is an "x" suffixed by the integers 3 and 24, respectively.

Examples

type_Z1,'suffixed_Z,integer'

true

(1)

typex1.32,'suffixedx,integer,float'

true

(2)

disconttanx,x

π_Z1~+12π

(3)

hastype,'suffixed_Z,_N,_NN,_B,integer'

true

(4)

dsolveⅆⅆtyt=yt,yt

yt=_C1ⅇt

(5)

hastype,'suffixed_C,integer'

true

(6)

typex4/2,'suffixedx,integer'

true

(7)

See Also

parse

type