comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Problem with Position of the enumeration Type
Date: Wed, 23 Jan 2019 23:50:45 +0200
Date: 2019-01-23T23:50:45+02:00	[thread overview]
Message-ID: <gas5smFnvd6U1@mid.individual.net> (raw)
In-Reply-To: <217206e7-81aa-4aa8-8d19-66498c36100d@googlegroups.com>

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
       .      @       .

  parent reply	other threads:[~2019-01-23 21:50 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-23 10:05 Problem with Position of the enumeration Type Luis Ladron de Guevara Moreno
2019-01-23 10:33 ` AdaMagica
2019-01-23 10:55   ` AdaMagica
2019-01-23 12:08   ` Luis Ladron de Guevara Moreno
2019-01-23 12:15     ` Karl Müller
2019-01-23 21:50     ` Niklas Holsti [this message]
2019-01-24  8:06     ` AdaMagica
2019-01-23 11:32 ` Mark Lorenzen
2019-01-23 12:30   ` Luis Ladron de Guevara Moreno
2019-01-23 20:22     ` Shark8
2019-01-24  8:13       ` AdaMagica
2019-01-23 17:06 ` Simon Wright
2019-01-23 22:54   ` Randy Brukardt
2019-01-23 23:47     ` Keith Thompson
2019-01-24  4:34       ` Keith Thompson
2019-01-24  9:11         ` Simon Wright
2019-01-24 21:41       ` Randy Brukardt
2019-01-23 21:42 ` Niklas Holsti
2019-01-23 22:35   ` Simon Wright
2019-01-23 23:20     ` Niklas Holsti
2019-01-24 16:43     ` Jeffrey R. Carter
2019-01-24 19:39       ` Niklas Holsti
2019-01-24 20:29         ` Jeffrey R. Carter
2019-01-24 21:43         ` Randy Brukardt
2019-01-26  9:44   ` G.B.
replies disabled

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