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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,453ed54f02292eea X-Google-Attributes: gid103376,public From: tmoran@bix.com Subject: Re: Simple Ada question Date: 2000/05/16 Message-ID: #1/1 X-Deja-AN: 624149191 References: <8f8fm5$de5$1@news.uit.no> X-Complaints-To: abuse@pacbell.net X-Trace: news.pacbell.net 958497443 207.214.211.127 (Tue, 16 May 2000 10:17:23 PDT) Organization: SBC Internet Services NNTP-Posting-Date: Tue, 16 May 2000 10:17:23 PDT Newsgroups: comp.lang.ada Date: 2000-05-16T00:00:00+00:00 List-Id: >test1.adb:8:06: warning: "I" is never assigned a value Line 8 of the program is n,I : Integer; and in column 6 we see the variable I defined. It is never used in the rest of the program. Probably you are confused because some programming languages would require this declaration of I and would use that I in the loop for I in 1 .. 10_000_000 loop whereas in Ada the loop variable is a brand new one, automatically created, in this case with the name I. eg, for I in 1 .. 10_000_000 loop ... end loop; acts like: declare I : Integer; begin for I in 1 .. 10_000_000 loop ... end loop; end; So you can drop the declaration of "I" on line 8.