# Examples 8.1.2.4:
ELT_HASH

The single feature of the required library class ELT_HASH is used in individual examples below. None of the examples given is a complete class nor necessarily a 'complete' method.

In all of the examples it will be assumed that the code shown is in a class called, say, EXAMPLE.

#### elt_hash

This feature returns a cardinal number as a hash value from the value of the object if it derives from $HASH or from the object identity if it is otherwise not immutable.

hash_val : CARD := some_element.hash

If some_element is an uncreated object then the resulting hash value is zero, otherwise implementatioin-dependent.

| Specification Index |  | Language Index |  | Section 8 Index

Comments or enquiries should be made to Keith Hopper . Page last modified: Thursday, 25 May 2000. |