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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.uzoreto.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: hreba Newsgroups: comp.lang.ada Subject: Re: Array Index: substitute integer with enumeration Date: Fri, 5 Jun 2020 17:16:42 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net wjq4txDzIkihjVpAoVPXnA6F53lyLSgMOXrDM4teWCI8E7Alq5 Cancel-Lock: sha1:dfTYni+evTLwzAbrA3u0yK899Hc= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 In-Reply-To: Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:58970 Date: 2020-06-05T17:16:42+02:00 List-Id: On 6/4/20 7:49 PM, Jeffrey R. Carter wrote: > > 1. If you can get your code to compile, you can check the object code to > see. > It ends here. I thought index types with the same length were convertible, but learned now that they aren't. Moreover, 'Pos is an attribute not of a variable, but of a type, what makes the expressions still more clumsy. So, If I don't want to fumble around with numbers, I have to define integer constants for the indices. > > Seems to me that with a design like > Unfortunately the type is defined in an external library, so I cannot change it. -- Frank Hrebabetzky, Kronach +49 / 9261 / 950 0565