| # Section 8.11.2.2: TRI_STATE |

###### immutable class TRI_STATE < $ENUMS{TRI_STATE}

#### Formal Types

types
SAME = TRI_STATE ;

This enumeration class provides a three-state logic response to a question requiring a yes/no answer. The answer provided may, of course, be 'yes' or 'no', but may also be a response which is interpetable as neither - giving rise to the third value 'unknown'.

#### External specifications

The following feature is required to be implemented for this class in accordance with the specification given in $IS_EQ :-

- is_eq(other : SAME) : BOOL

The following feature is required to be implemented for this class in accordance with the specification given in $HASH :-

- hash : CARD

The following features are required to be implemented for this class in accordance with the specifications given in $BINARY :-

- create(storage : BINSTR) : SAME
- build(cursor : BIN_CURSOR) : SAME
- read(cursor : BIN_CURSOR) : SAME
- binstr : BINSTR
- write(fyle : BIN_FILE)

The following featuress are required to be implemented for this class in accordance with the specifications given in $STR :-

- str(lib : LIBCHARS) : STR
- str : STR

The following feature is required to be implemented for this class in accordance with the specification given in $INSTR :-

- build(str : STR_CURSOR) : SAME
- build(str : STR_CURSOR, lib : LIBCHARS) : SAME

The following features are required to be implemented for this class in accordance with the specifications given in $ANCHORED_FMT :-

- fmt(descr : ANCHORED_DESCR, lib : LIBCHARS) : STR
- fmt(descr : ANCHORED_DESCR) : STR

The following features are required to be implemented for this class in accordance with the specifications given in $ENUMS{T} :-

- create(val : CARD) : SAME
- create(val : STR) : SAME
- offset : CARD
- cardinality : CARD
- enum : CARD
- card : CARD
- is_enum(str : STR) : CONVERSION_RESULTS

#### Enumeration Values

This enumeration provides three values which may be given the interpretation indicated :-

- No - this value models the negative response to a question requiring a Boolean response.
- Yes - this value models the affirmative response to a question requiring a Boolean response.
- Unknown - this value models an uninterpretable answer to a question requiring a Boolean response.

| Language Index |  | Library Index |  | Non-numeric Index

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