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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5d489a63e16a038 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!postnews.google.com!l33g2000pri.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: loop variable Date: Mon, 29 Sep 2008 07:54:22 -0700 (PDT) Organization: http://groups.google.com Message-ID: <8736077d-94e0-4a53-9d0a-2999a421a8e3@l33g2000pri.googlegroups.com> References: NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1222700063 6026 127.0.0.1 (29 Sep 2008 14:54:23 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 29 Sep 2008 14:54:23 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l33g2000pri.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:2136 Date: 2008-09-29T07:54:22-07:00 List-Id: On Sep 28, 6:54 pm, jedivaughn 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? If either of the expressions in the range had a particular type, "I" would be of that type. E.g. for I in 1..X where X is declared with some user-defined integer type, then "I" would have the same type as X. The above case, where the range is made up of two universal integers, is special, and the language defines the type to be Standard.Integer in that case. You can also say something like for I in My_Int_Type range 1..10 and then "I" would have the type My_Int_Type. -- Adam