item of attributes

operator

Return type:
Integer
Returns:
Returns the item number of the indicated attribute.
Syntax
item of specified? attributes (of element-expression)? {string-expression}
    


Purpose

item of attributes can be used to determine the order in which the attributes were declared. When specified, the first declared attribute has item number 1, the second has item number 2, and so on.

When item of is applied to an item on the attributes shelf, the key indexer is required.

item of is used in this example to ensure that a line of text is output only when the IDENT attribute is the first one declared in its ATTLIST:

  output "IDENT is the first declared attribute%n"
     when item of attributes{"IDENT"} = 1

Related Syntax