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!feeder.eternal-september.org!news.unit0.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Problem with Position of the enumeration Type Date: Wed, 23 Jan 2019 23:50:45 +0200 Organization: Tidorum Ltd Message-ID: References: <3d782720-227d-4d86-b403-eacbd1b9d0d2@googlegroups.com> <72fd7f46-21bb-45b9-9621-237bca776378@googlegroups.com> <217206e7-81aa-4aa8-8d19-66498c36100d@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net I2UImd/uv6kGI9h76gP2pgX7qEpBuzjsa0gJs1SkgYJIlz9hbu Cancel-Lock: sha1:p+Yfx0xtA/kBs3j1JTFTPw4RGYY= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: <217206e7-81aa-4aa8-8d19-66498c36100d@googlegroups.com> Xref: reader01.eternal-september.org comp.lang.ada:55345 Date: 2019-01-23T23:50:45+02:00 List-Id: On 19-01-23 14:08 , Luis Ladron de Guevara Moreno wrote: > El miércoles, 23 de enero de 2019, 11:33:36 (UTC+1), AdaMagica escribió: >> ... >> Some questions on your code: >> ... >> >> for I in E_Test'Base loop -- Why do you use 'Base here? > ... > I'm using 'Range to go through all the positions in enumeration. You misread AdaMagica's question, which was about 'Base (which you use), not about 'Range (which you did not use). In your code, as E_Test is a not a subtype of some wider enumeration type, E_Test'Base is the same as E_Test. Regarding 'Range, note that for E in E_Test'Range loop ... end loop; can be written simply as for E in E_Test loop ... end loop; with exactly the same effect. Now: did you mean to write 'Base (and not 'Range), and if so, why? -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .