## Description

# is used as both a unary and a binary operator.

As a unary operator: #x returns the length or cardinality of a list, set, hash table, or string x.

As a binary operator: x#i returns the ith element of a list, hash table, database, or string x.

 i1 : L = {23, 42, 107, 2, 50}; i2 : #L o2 = 5 i3 : L#2 o3 = 107

## Caveat

The precedence of # when used as a binary operator is high, as high as ., but when used as a unary operator the precedence is much lower.

## Ways to use symbol # :

• # BasicList -- length or cardinality
• "# HashTable" -- see # BasicList -- length or cardinality
• "# Set" -- see # BasicList -- length or cardinality
• "# String" -- see # BasicList -- length or cardinality
• BasicList # ZZ -- get value from list, hash table, database, or string
• "Database # String" -- see BasicList # ZZ -- get value from list, hash table, database, or string
• "HashTable # Thing" -- see BasicList # ZZ -- get value from list, hash table, database, or string
• "String # ZZ" -- see BasicList # ZZ -- get value from list, hash table, database, or string

## For the programmer

The object # is .