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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!weretis.net!feeder4.news.weretis.net!news.szaf.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: How to access an array using two different indexing schemes Date: Thu, 30 Nov 2017 16:47:36 +0200 Organization: Tidorum Ltd Message-ID: References: <0b6bd27e-e9ec-4854-bbb1-85e1d9ac92e1@googlegroups.com> <227d5a7f-6d5b-4b76-ac31-7d15bb6dc284@googlegroups.com> <16c980c2-1fa6-4084-97ea-b576c75b99c3@googlegroups.com> <3ca6a682-9af1-40e3-a4ac-db739b38e4d7@googlegroups.com> <8a31c728-0261-4f41-b82e-e7128369ebc1@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net l0WcT1+yI4nJq6FHtgXuvgBeXTN4hqa7MkGSQetAluiCy8aHlU Cancel-Lock: sha1:rtq31h9j/bg2PA0J2Jw7gc2p0WY= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: <8a31c728-0261-4f41-b82e-e7128369ebc1@googlegroups.com> Xref: reader02.eternal-september.org comp.lang.ada:49275 Date: 2017-11-30T16:47:36+02:00 List-Id: On 17-11-30 13:40 , AdaMagica wrote: > OK, I dived into the RM: > > 8.5.1(4) The renamed entity shall be an object. > 3.3(12) [An object is a] view conversion of another object. > 4.6(5/2) A type_conversion whose operand is the name of an > object is called a view conversion if both its target type > and operand type are tagged, or if it appears in a call as > an actual parameter of mode out or in out; other > type_conversions are called value conversions. > > So my conclusion is: > > The renamings here are illegal (not tagged). > The subprogram calls as shown in my previous post are legal. > > Didn't try however. Good luck for you! Perhaps the next Ada revision could extend 4.6(5/2) to include a type conversion in a renaming, as a view conversion? It seems to me that on the implementation level, this case (declaring a new local variable to be a renaming of a type conversion of an object) should be very similar to the actual-parameter case of 4.6(5/2). -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .