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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,adbfb5b65308687 X-Google-Attributes: gid103376,public From: Charles Rose Subject: Re: for-loop parameters Date: 1997/09/25 Message-ID: <342A69C0.474C@hazeltine.com>#1/1 X-Deja-AN: 275465679 References: Reply-To: rose@hazeltine.com Organization: GEC-Marconi Hazeltine Newsgroups: comp.lang.ada Date: 1997-09-25T00:00:00+00:00 List-Id: Tucker Taft gave many examples of for loop parameters but left out for I in My_Subtype loop which uses a loop index that ranges over all values of My_Subtype, and is equivalent to for I in My_Subtype range My_Subtype'first..My_Subtype'last loop When the loop index is an array index, I prefer to cite the array object instead of the array index subtype, as in > for J in An_Array'Range loop -- uses index subtype of An_Array These two forms do not explicitly state the limits of the loop, but rather infer them. I use these forms whenever I can.