comp.lang.ada
 help / color / mirror / Atom feed
From: "Peter C. Chapin" <pcc482719@gmail.com>
Subject: Re: loop variable
Date: Mon, 29 Sep 2008 06:38:58 -0400
Date: 2008-09-29T06:38:58-04:00	[thread overview]
Message-ID: <48e0b042$0$26352$4d3efbfe@news.sover.net> (raw)
In-Reply-To: <f1b15f7e-26a1-4f61-80a0-6f9ce1cfe251@m36g2000hse.googlegroups.com>

jedivaughn wrote:

> What data_type is a loop variable
> as an example
> for i in 1..10
> what data type is i?

The subtype of a loop variable is the subtype used to define the loop's
range. Something like '1..10' is shorthand for 'Integer range 1..10' and
so in your example I has type Integer.

However, I echo the comments Georg Bauhaus made in his post: be careful
with conversions. They often (not always) mean you haven't defined your
types properly or that you haven't declared your variables with the most
appropriate types.

Peter



  parent reply	other threads:[~2008-09-29 10:38 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
2008-09-29  8:52   ` Georg Bauhaus
2008-09-29 10:38 ` Peter C. Chapin [this message]
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