![]() |
Section 8.11.3.1: |
![]() |
This class implements the concept of a logical response by a user (which is expected to be in the form of a text string) to a question requiring a yes/no answer.
The corresponding names in the culture-dependent resources file should be the language-dependent names for the English notions 'No' and 'Yes'.
The following features are required to be implemented for this class in accordance with the specifications given in $BINARY :-
This feature produces a new recognizer for potential answers given the affirmative and negative extended regular expressions as arguments. These regular expressions are provided for in the international culture spcification document (ISO/IEC 14652).
The result, not being an optional object is the newly created recognizer and the post-condition is true.
This creation creates a recognizer for yes/no answers from the extended regular expression arguments.
This feature returns true provided that the string is a valid match for the 'yes' regular expression known to the recognizer, otherwise false. It must, however, be pointed out that returning false does not mean that the string was recognized as being negative - merely that it was not recognised as being affirmative.
This predicate returns true if and only if the argument is a match for the affirmative regular expression known to the recognizer.
This feature returns true provided that the string is a valid match for the 'no' regular expression known to the recognizer, otherwise false. It must, however, be pointed out that returning false does not mean that the string was recognized as being affirmative - merely that it was not recognised as being negative.
This predicate returns true if and only if the argument is a match for the negaative regular expression known to the recognizer.
This feature provides the response value explicitly, rather than as a truth value used in the previous two features.
This feature provides the three state logic value which represents the result of attempts at matching val against both affirmative and negative regular expressions as known to this recognizer.
![]() |
Language Index | ![]() |
Library Index | ![]() |
Non-numeric Index |
Comments or enquiries should be made to
Keith
Hopper. Page last modified: Wednesday, 22 November 2000. |
![]() |