comp.lang.ada
 help / color / mirror / Atom feed
From: Norman Worth <nworth@comcastNOSPAM.net>
Subject: Re: Test for constant (or "in parameter" in procedure)
Date: Sun, 26 Mar 2017 14:57:40 -0600
Date: 2017-03-26T14:57:40-06:00	[thread overview]
Message-ID: <hLydnQL58uretkXFnZ2dnUU7-I2dnZ2d@giganews.com> (raw)
In-Reply-To: <ce914880-959e-48c9-8ffc-7f14cd022ed6@googlegroups.com>

reinkor wrote:
> Hi,
>
> is it a good way to test if an object is a constant or not (or "in parameter" in a procedure)? Something in addition to declare it as a constant?
>
> If I am sure an object is a constant (and can check it) then this can sometimes help to structure/optimize the code. I would like to have some redundancy and make sure an object is really constant when this is a prerequisite for a piece of code to be according to my intentions - i.e. if the object is messed with somewhere, then things could go wrong. So I would like some "local check" to be sure a constant is really a constant :-) Specially if many people are involved to change code over time.
>
> reinert
>
This might best be handled by a comment warning that the constant must 
be a constant (or in parameter) because of its later use.

      parent reply	other threads:[~2017-03-26 20:57 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
2017-03-26 20:57 ` Norman Worth [this message]
replies disabled

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