work in progress | character


Class CHARACTER: Changes from ELKS 95 to ELKS 2002


February 2001:

March 2001: September 2001:

Proposal

Refine the specification of infix "<" according to the 19 FEBRUARY 2001 version.

   19 FEBRUARY 2001 VERSION

   infix "<" (other: like Current): BOOLEAN
      -- Is 'other' greater than current character?
      -- (Inherited from COMPARABLE.)
      require  -- from COMPARABLE
         other_exists: other /= Void
      ensure  -- from COMPARABLE
         asymmetric: Result implies not (other < Current)
      ensure then
         definition: result = (code < other.code)

Notes

This poll was combined with a poll for infix "<" in class STRING.

A set of parentheses was inserted into the "definition" postcondition (after the call to vote) to correct an undisputed precedence error.

Result

- Accept the proposal
     - manus@eiffel.com
     - gmc444@yahoo.com
     - franck@nenie.org
     - xavier@halstenbach.com
     - chcouder@club-internet.fr
     - saunderscj2000@yahoo.com
     - peter@deakin.edu.au
     - ericb@gobosoft.com
     - kwaxer@aha.ru
     - arno.wagner@acm.org
     - James McKim (by email)

The proposal was accepted.


Proposal

Add features 'as_lower' and 'as_upper' to class CHARACTER according to the 08 MARCH 2001 19:15 version.

   08 MARCH 2001 19:15 version

   as_lower: CHARACTER
      -- Lower case equivalent.
      converted:
         ("ABCDEFGHIJKLMNOPQRSTUVWXYZ").has(Current)
          implies Result = ("abcdefghijklmnopqrstuvwxyz").item(
          ("ABCDEFGHIJKLMNOPQRSTUVWXYZ").index_of(Current, 1))
      unchanged:
         not ("ABCDEFGHIJKLMNOPQRSTUVWXYZ").has(Current)
          implies Result = Current

   as_upper: CHARACTER
      -- Upper case equivalent.
      converted:
         ("abcdefghijklmnopqrstuvwxyz").has(Current)
          implies Result = ("ABCDEFGHIJKLMNOPQRSTUVWXYZ").item(
          ("abcdefghijklmnopqrstuvwxyz").index_of(Current, 1))
      unchanged:
         not ("abcdefghijklmnopqrstuvwxyz").has(Current)
          implies Result = Current

Notes

This poll was combined with a poll for 'as_lower' and 'as_upper' in class STRING.

The "ensure" keyword (missing in this proposal) was added to the proposed class text after the call-to-vote.

Result

- Strongly accept the proposal
     - usander@online.de
- Accept the proposal
     - gmc444@yahoo.com
     - xavier@halstenbach.com
     - saunderscj2000@yahoo.com
     - arno.wagner@acm.org
     - kiniry@acm.org
     - chcouder@club-internet.fr
     - franck@nenie.org
     - jeff.clark@sdrc.com
     - peter@deakin.edu.au
     - kwaxer@aha.ru
     - sparker@eiffel.ie
     - James McKim (by email)

The proposal was accepted.


Proposal

Proposal for class CHARACTER: Refine the specification of 'as_lower' and 'as_upper' to the 25 SEPTEMBER 2001 version.

   25 SEPTEMBER 2001 VERSION

   as_lower: like Current
      -- Lower case equivalent
      ensure
         non_void_result:
            Result /= Void
         converted:
            ("ABCDEFGHIJKLMNOPQRSTUVWXYZ").has(item)
             implies Result.item = ("abcdefghijklmnopqrstuvwxyz").item(
             ("ABCDEFGHIJKLMNOPQRSTUVWXYZ").index_of(item, 1))
         unchanged:
            not ("ABCDEFGHIJKLMNOPQRSTUVWXYZ").has(item)
             implies Result = Current

   as_upper: like Current
      -- Upper case equivalent
      ensure
         non_void_result:
            Result /= Void
         converted:
            ("abcdefghijklmnopqrstuvwxyz").has(item)
             implies Result.item = ("ABCDEFGHIJKLMNOPQRSTUVWXYZ").item(
             ("abcdefghijklmnopqrstuvwxyz").index_of(item, 1))
         unchanged:
            not ("abcdefghijklmnopqrstuvwxyz").has(item)
             implies Result = Current

Notes

The differences between the previous version and the proposed new version are that: The purpose of these changes is to make these features correct in proper descendants of CHARACTER (where 'Current' is not a CHARACTER and might not be expanded).

Result

- Accept the proposal
     - berend@pobox.com
     - ericb@gobosoft.com
     - chris.saunders@sympatico.ca
     - chcouder@club-internet.fr
     - glennmaughan@optushome.com.au
     - arno.wagner@acm.org
     - sparker@eiffel.ie
     - kwaxer@aha.ru
     - xavier@halstenbach.com
     - gmc444@yahoo.com
     - James McKim (by email)

The proposal was accepted.