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!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Test for constant (or "in parameter" in procedure) Date: Thu, 9 Feb 2017 19:03:40 +0100 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <8aaa2cef-9ca2-4536-bdf2-1567947b9ab8@googlegroups.com> <24a8808f-dd9e-4fcf-bbe5-226f56a41eb9@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 9 Feb 2017 18:01:53 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="cb643a229d02ad3a0d0c462788ed274d"; logging-data="27472"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX199Wm5DW3YD04yXzWIYDXx5Q+ybWZgRH98=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 In-Reply-To: <24a8808f-dd9e-4fcf-bbe5-226f56a41eb9@googlegroups.com> Cancel-Lock: sha1:DCDd+Ucv5el8+LUcP4umECPgaKg= Xref: news.eternal-september.org comp.lang.ada:33296 Date: 2017-02-09T19:03:40+01:00 List-Id: On 02/09/2017 01:46 PM, reinkor wrote: > > i : Constant Integer := 5; -- all OK so far (but someone could > change this to a variable) If someone changes it to a variable, presumably it's because of a logic change in which it can no longer be constant. There would then be further changes to the code to make use of its new variability. In the process, the person making the change would come across your test and remove it, since it's no longer relevant. So I don't see that such a test would buy you anything. If you have someone going around changing constants to variables for no reason, I suggest you no longer make use of that person's services. -- Jeff Carter "I'm a lumberjack and I'm OK." Monty Python's Flying Circus 54