Version 1.1 of acs/ac-00121.txt

Unformatted version of acs/ac-00121.txt version 1.1
Other versions for file acs/ac-00121.txt

!standard 3.5(13)          05-10-24 AC95-00121/01
!class Amendment 05-10-24
!status received no action 05-10-24
!status received 05-10-02
!subject Nominal subtypes for all names

From: Tucker Taft
Date: Sunday, October  2, 2005  8:08 PM

I bumped into an interesting situation recently,

     case S'Last is
       when 0 =>  -- error: choice shall cover only values of
                  --        the nominal subtype

Our compiler had decided the nominal subtype of S'Last
was S, and zero wasn't a value of the subtype S.
But there isn't any definition of what is the
nominal subtype of attributes.  If S turns out to
be a null subtype, then clearly neither S'Last nor
S'First will be a value of subtype S.  So I came to
the conclusion that the nominal subtype of an
attribute like S'Last or S'First would be S'Base.
But it really ought to say that somewhere.  Similar
questions arise for enumeration literals and other
things that happen to be "Name"s but for which there
is no defined nominal subtype.

Any thoughts?


Questions? Ask the ACAA Technical Agent