From: David Botton <david@botton.com>
Subject: Re: New to Ada, why these warning messages?
Date: Thu, 31 Dec 2015 18:47:37 -0800 (PST)
Date: 2015-12-31T18:47:37-08:00 [thread overview]
Message-ID: <bd0c80b2-0402-449d-a3f1-c5a35ba54240@googlegroups.com> (raw)
In-Reply-To: <n64nnt$ft6$1@reader1.panix.com>
> gnatarr2.adb:24:04: warning: variable "I" is never read and never
> assigned
Correct the I in line 24 at the procedure scope is neve used
> gnatarr2.adb:54:08: warning: for loop implicitly declares loop
> variable
In Ada when you use for the var you choose is local to the for loop
> gnatarr2.adb:54:08: warning: declaration hides "I" declared at line 24
So this new I hides the I in line 24 and the compiler is helping you to understand this.
> But I do not understand the warning messages. What's wrong with
> the definition of I: Integer; on line 24?
Nothing you just never use it only the brand new I in your for loop.
David Botton
next prev parent reply other threads:[~2016-01-01 2:47 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-01 2:19 New to Ada, why these warning messages? Dale Dellutri
2016-01-01 2:47 ` David Botton [this message]
2016-01-01 5:54 ` Jeffrey R. Carter
2016-01-01 21:18 ` Bob Duff
2016-01-01 17:30 ` Dennis Lee Bieber
2016-01-01 20:20 ` Dale Dellutri
2016-01-01 21:24 ` Bob Duff
2016-01-01 21:54 ` Dale Dellutri
2016-01-02 12:45 ` Simon Clubley
2016-01-02 14:21 ` Britt
2016-01-02 15:29 ` Simon Clubley
2016-01-03 7:11 ` J-P. Rosen
2016-01-03 9:32 ` Simon Wright
2016-01-03 9:59 ` Simon Clubley
2016-01-03 14:23 ` David Botton
2016-01-03 15:48 ` J-P. Rosen
2016-01-03 18:03 ` David Botton
2016-01-03 18:20 ` Pascal Obry
2016-01-03 19:05 ` David Botton
2016-01-01 23:50 ` Jeffrey R. Carter
2016-01-02 21:05 ` Bob Duff
2016-01-02 22:53 ` Jeffrey R. Carter
2016-01-02 17:59 ` Dennis Lee Bieber
2016-01-02 18:37 ` Paul Rubin
2016-01-02 21:03 ` Bob Duff
2016-01-02 21:08 ` Bob 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