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 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Q: discrete_subtype_definition: static only cases? Date: Sun, 7 Jun 2020 15:00:12 +0200 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <2d4d6645-7055-4564-a854-6da5fc83af4eo@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 7 Jun 2020 13:00:13 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="b243c502e7d88efa94d0bed85751046f"; logging-data="15670"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19EoHpq6JqX+VyAdEL4gNj+4v9LDUFORTI=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 Cancel-Lock: sha1:ybW7fuxO9F4SMuDVr7IBC5PwMJ0= In-Reply-To: <2d4d6645-7055-4564-a854-6da5fc83af4eo@googlegroups.com> Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:59002 Date: 2020-06-07T15:00:12+02:00 List-Id: On 6/7/20 11:27 AM, gautier_niouzes@hotmail.com wrote: > > procedure SD is > A : array (1 .. 5) of Integer; > type XYZ is (X, Y, Z); > begin > for I in 1 .. 3 loop > declare > B : array (1 .. I) of Integer; -- I is a variable > begin > for J in 1 .. I loop -- I is a variable > B (J) := J; > end loop; > end; > end loop; > for E in XYZ loop > declare > subtype S is XYZ range X .. E; -- E is a variable > begin > null; > end; > end loop; > end; The things you have marked as variables are all constants. They're not static, but you can't assign to them. -- Jeff Carter "How'd you like to hide the egg and gurgitate a few saucers of mocha java?" Never Give a Sucker an Even Break 101