attributed - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


type/attributed

check if an expression has attributes

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

type(expr, 'attributed')

type(expr, 'attributed(attr1, attr2, ... )')

Parameters

expr

-

any expression

attr1, attr2, ...

-

(optional) expressions representing attributes

Description

• 

An expression is of type attributed if it has attributes; that is, if the expression sequence of its attributes is not NULL.

• 

The command type(expr, 'attributed') returns true if expression expr is of type attributed. Otherwise, false is returned.

• 

By using the second form of the calling sequence, you can check for one or more specific attributes. In this case, the test returns true if the expression expr has all of the specified attributes attr1, attr2, .... Otherwise, false is returned.

Examples

typesin,attributed

true

(1)

typesin,attributedblue

false

(2)

typesin,attributedprotected

true

(3)

attributessin

protected,_syslib

(4)

setattributefoo,red,blue

foo

(5)

typefoo,attributed

true

(6)

typefoo,attributedred

true

(7)

typefoo,attributedblue

true

(8)

typefoo,attributedred,blue

true

(9)

typefoo,attributedred,blue,green

false

(10)

See Also

attributes

setattribute

type