| # Examples 7.2.1: BIT |

The features of the pervasive class BIT are used in individual examples. None of the examples given is a complete class nor necessarily a 'complete' method.

#### is_eq

Assuming that the following two statements have already been executed then the equality expression following them is true -

single_bit : BIT := clearbit ;
other_bit : BIT := single_bit ;
equals : BOOL := (other_bit = single_bit)

#### set

This feature returns true if and only if the bit is set, thus -

equals := single_bit.set = other_bit.set

will always make equals true.

#### clear

This feature returns true if and only if the bit is clear, thus -

equals := single_bit.clear = other_bit.clear

will also make equals true.

| Specification Index |  | Language Index |  | Section 7 Index

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