comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: loop on character
Date: Thu, 9 Oct 2008 15:18:39 -0700 (PDT)
Date: 2008-10-09T15:18:39-07:00	[thread overview]
Message-ID: <1a232bc8-f1de-4a68-9771-90129463c992@l33g2000pri.googlegroups.com> (raw)
In-Reply-To: 534b9ac0-6720-4f40-b1e0-bd5d45299d2a@l33g2000pri.googlegroups.com

On Oct 9, 12:13 pm, Jerry <lancebo...@qwest.net> wrote:
> On Oct 8, 2:42 pm, Adam Beneschan <a...@irvine.com> wrote:
>
>
>
> > for C in Character range '0' .. '9' loop
>
> >                              -- Adam
>
> Does this construction have a name? By "this construction" I mean the
> presence of Character in the for statement.

It doesn't quite have a name of its own.  "Character range '0'..'9'"
is a discrete_subtype_definition, but it would still be that without
the type name.  Going further, this form of
discrete_subtype_definition is a discrete_subtype_indication, which is
just a kind of subtype_indication, which is a type or subtype name
optionally followed by a constraint.  See 5.5(4), 3.6(6), 3.2.2(3).
Note the *optionally*: you can write a loop providing just a type
(subtype) name without the range constraint---see Bob's response for
an example.

> Presumably other types can
> be included at that position.

Yes, but only discrete types (integer or enumeration).

                                -- Adam





  reply	other threads:[~2008-10-09 22:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-08 21:26 loop on character Bernd Specht
2008-10-08 21:42 ` Adam Beneschan
2008-10-08 22:45   ` Jeffrey R. Carter
2008-10-09 19:13   ` Jerry
2008-10-09 22:18     ` Adam Beneschan [this message]
2008-10-08 22:50 ` Robert A Duff
replies disabled

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