x#?i
If x is a list, x#?i tells whether there is an ith element of x. The entries of the list are numbered starting with 0. If i is negative, then the entries are numbered ending with -1.
|
|
|
If x is a hash table or database, x#?i tells whether there is a value associated with the key i.
|
|
|
If x is a string, x#?i tells if x has an ith character.
|
|
|
#? can be very useful in avoiding errors from attempting to access nonexistent elements of lists or hash tables.