# Section 8.16.2.1:
CURSOR_ERRORS

###### class CURSOR_ERRORS < $ENUMS{CURSOR_ERRORS}

#### Formal Types

types
SAME = CURSOR_ERRORS ;
CURSOR_ERRORS = token

This is an enumeration class which provides tokens for the error-conditions which can occur when using a cursor to scan a string of some kind.

The resources text strings corresponding to this class should have names which are indicative of their semantic intent in the culture concerned.

#### 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 features are 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
- offset : CARD
- cardinality : CARD
- enum : CARD
- card : CARD
- is_enum(str : STR) : CONVERSION_RESULTS

#### Enumeration Values

This enumeration provides the values which indicate the permitted actions in respect of the file created/opened with that particular mode :-

- Not_Digit - in a context where a number was expected some other element was found.
- Past_End - the cursor position is already past the end and an advance cannot be made.
- Past_Beginning - the cursor position is already at the beginning of the buffer so cannot be retracted.
- Conversion_Error - in an operation where conversion from a sequence of elements to some other model value some model value dependent error occurred.
- Element_Not_Found - during a search for an element the end of the string was encountered before the element was found.
- Format_Error - in an operation where the structure of a sequence of elements was defined, the expeted structure was not there.
- Bad_Block - in an attempt to skip or get a block of elements the block delimiters were not correct.
- Already_at_End - the cursor is currently positioned at the end of the string.

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

Comments or enquiries should be made to Keith Hopper. Page last modified: Friday, 24 November 2000. |