type/attributed
check if an expression has attributes
Calling Sequence
Parameters
Description
Examples
type(expr, 'attributed')
type(expr, 'attributed(attr1, attr2, ... )')
expr
-
any expression
attr1, attr2, ...
(optional) expressions representing attributes
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.
type⁡sin,'attributed'
true
type⁡sin,'attributed⁡blue'
false
type⁡sin,'attributed⁡protected'
attributes⁡sin
protected,_syslib
setattribute⁡foo,'red','blue'
foo
type⁡foo,'attributed'
type⁡foo,'attributed⁡red'
type⁡foo,'attributed⁡blue'
type⁡foo,'attributed⁡red,blue'
type⁡foo,'attributed⁡red,blue,green'
See Also
attributes
setattribute
type
Download Help Document
What kind of issue would you like to report? (Optional)