From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1b3cf847f22f6902,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-17 21:43:24 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!uunet!sea.uu.net!ash.uu.net!news.chatlink.com!not-for-mail From: "Keith" Newsgroups: comp.lang.ada Subject: Array type conversion Date: Thu, 17 Oct 2002 21:43:13 -0700 Organization: OWDS Inc. Sender: e27182818@dialup-63.212.130.239.dial1.losangeles1.level3.net Message-ID: NNTP-Posting-Host: dialup-63.212.130.239.dial1.losangeles1.level3.net X-Trace: news.chatlink.com 1034916202 28926 63.212.130.239 (18 Oct 2002 04:43:22 GMT) X-Complaints-To: abuse@chatlink.com NNTP-Posting-Date: Fri, 18 Oct 2002 04:43:22 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:29890 Date: 2002-10-17T21:43:13-07:00 List-Id: What is the implementation consequence of not following Ada reference manual section 4.6 12/1 "The component subtypes shall statically match"? What was the rational behind not allowing something like the following: type some_type is new integer; type A is array ( index_type) of integer; type B is array ( index_type) of some_type; Array_A:A; Array_B:B; declare begin Array_A:=A( Array_B); end; Rather than the legal but more cumbersome for Index in index_type'range loop Array_A(Index):=A(Array_B(Index)); end loop; I know that if the component subtypes have to statically match in an array conversion then there is no need to check for matching constraints at run time like Ada 83. Does this speed up execution? But Array_A:=A( Array_B); seems more inline with the spirit of Ada Array operations like A+B etc. Thanks -- Keith