comp.lang.ada
 help / color / mirror / Atom feed
From: george.priv@gmail.com
Subject: Re: loop variable
Date: Sun, 28 Sep 2008 20:20:50 -0700 (PDT)
Date: 2008-09-28T20:20:50-07:00	[thread overview]
Message-ID: <f1e0708f-da4a-4418-8fce-4ccab6bc5ec8@k30g2000hse.googlegroups.com> (raw)
In-Reply-To: f1b15f7e-26a1-4f61-80a0-6f9ce1cfe251@m36g2000hse.googlegroups.com

On Sep 28, 9:54 pm, jedivaughn <jedivaugh...@gmail.com> wrote:
> What data_type is a loop variable
> as an example
> for i in 1..10
> what data type is i?
> and can I convert it to an integer?
>
> -John

In your example I will be Standard.Integer.  In case:

type Weekday_Type is (sun, mon, tue, wed, thu, fri, sat);
...
for I in Weekday_Type'Range loop

.or.

for I in mon..fri loop

it will be Weekday_Type.  See AARM 5.5: http://www.adaic.com/standards/05aarm/html/AA-5-5.html

George



  reply	other threads:[~2008-09-29  3:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-29  1:54 loop variable jedivaughn
2008-09-29  3:20 ` george.priv [this message]
2008-09-29  8:52   ` Georg Bauhaus
2008-09-29 10:38 ` Peter C. Chapin
2008-09-30  7:52   ` Jean-Pierre Rosen
2008-09-29 14:54 ` Adam Beneschan
replies disabled

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