From: Charles Rose <rose@hazeltine.com>
Subject: Re: for-loop parameters
Date: 1997/09/25
Date: 1997-09-25T00:00:00+00:00 [thread overview]
Message-ID: <342A69C0.474C@hazeltine.com> (raw)
In-Reply-To: EH0yCt.43p.0.-s@inmet.camb.inmet.com
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.
next prev parent reply other threads:[~1997-09-25 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-09-24 0:00 for-loop parameters CMSC 330-4021 Student 23
1997-09-24 0:00 ` Tucker Taft
1997-09-25 0:00 ` Charles Rose [this message]
1997-09-25 0:00 ` Matthew Heaney
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox