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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.140.161.6 with SMTP id h6mr63743221qhh.1.1451616457524; Thu, 31 Dec 2015 18:47:37 -0800 (PST) X-Received: by 10.182.241.195 with SMTP id wk3mr592361obc.8.1451616457487; Thu, 31 Dec 2015 18:47:37 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!94no2228257qgt.1!news-out.google.com!f6ni39521igq.0!nntp.google.com!mv3no23906439igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 31 Dec 2015 18:47:37 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=50.138.108.113; posting-account=yiWntAoAAAC1KqC_shmxJYv07B9l6LNU NNTP-Posting-Host: 50.138.108.113 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: New to Ada, why these warning messages? From: David Botton Injection-Date: Fri, 01 Jan 2016 02:47:37 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:28968 Date: 2015-12-31T18:47:37-08:00 List-Id: > 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