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!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Mon, 29 Sep 2008 10:52:08 +0200 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: loop variable References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <48e09739$0$6616$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 29 Sep 2008 10:52:09 CEST NNTP-Posting-Host: 35e76f8d.newsspool3.arcor-online.net X-Trace: DXC=_]iJSjfUbJLh>_cHTX3jM:0^aLYI^P7C X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:2130 Date: 2008-09-29T10:52:09+02:00 List-Id: george.priv@gmail.com schrieb: > On Sep 28, 9: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? As an alternative, don't convert a loop variable to an integer if possible; instead, consider what the loop variable is used for, and whether the numbers you could be make a numeric (sub)type of their own. You can then use a technique such as the one already mentioned ('Range) in another posting. (Integer tends to invite many "evil" things such as bound errors, lack of distinction between numeric data, and more, and there is nothing gained when using predefined Ada Integer instead of your own problem's numeric types :-)