comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Test for constant (or "in parameter" in procedure)
Date: Thu, 9 Feb 2017 19:03:40 +0100
Date: 2017-02-09T19:03:40+01:00	[thread overview]
Message-ID: <o7iaqh$qqg$1@dont-email.me> (raw)
In-Reply-To: <24a8808f-dd9e-4fcf-bbe5-226f56a41eb9@googlegroups.com>

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

  parent reply	other threads:[~2017-02-09 18:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-09  4:38 Test for constant (or "in parameter" in procedure) reinkor
2017-02-09 12:11 ` AdaMagica
2017-02-09 12:46   ` reinkor
2017-02-09 13:09     ` Dmitry A. Kazakov
2017-02-09 14:10     ` AdaMagica
2017-02-09 15:01       ` reinkor
2017-02-09 16:51     ` G.B.
2017-02-09 16:59       ` reinkor
2017-02-09 17:17         ` Dmitry A. Kazakov
2017-02-09 17:31           ` G.B.
2017-02-09 18:46       ` Niklas Holsti
2017-02-10  7:48         ` reinkor
2017-02-09 18:03     ` Jeffrey R. Carter [this message]
2017-03-26 20:57 ` Norman Worth
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox