comp.lang.ada
 help / color / mirror / Atom feed
Subject: implicit array type conversion
Date: 26 Jul 90 13:27:42 GMT	[thread overview]
Message-ID: <1990Jul26.132742.3828@planck.uucp> (raw)

Why is it that implicit array type conversion does not apply to the
following situation?  I can't find anything in the RM that disallows
this situation for implicit conversion.

The compiler (Verdix Sun 4 Self, version 6.0.2(g)) gives the following
warning for the assignment to B:

warning: RM 3.6.1: bounds check will raise CONSTRAINT_ERROR at runtime

It does raise the exception on execution.

I sorta wanted to get some other views before I flag this to Verdix as a
bug.  Minor flame: Its real easy to miss some statement buried in the RM
which clarifies these kinds of language lawyer issues.

------------------------ cut here ----------------------------------
procedure Strings is

   type STRING (Len : NATURAL) is
      record
         S : Standard.STRING(1..Len);
      end record;

   A : Standard.STRING(7..7);
   B : STRING(1);

begin -- Strings

   A := "X";
   B := (A'length, A);

end Strings;

Terry J. Westley
Arvin/Calspan Advanced Technology Center
P.O. Box 400, Buffalo, NY 14225
acsu.buffalo.edu!planck!hercules!westley

             reply	other threads:[~1990-07-26 13:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1990-07-26 13:27  [this message]
1990-07-26 20:36 ` implicit array type conversion David Collard
1990-07-27 17:13   ` Michael Feldman
  -- strict thread matches above, loose matches on Subject: below --
1990-07-26 20:56 "Norman H. Cohen"
     [not found] <132742@<1990Jul26>
1990-07-27 16:01 ` stt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox