comp.lang.ada
 help / color / mirror / Atom feed
From: "Steve" <nospam_steved94@comcast.net>
Subject: Re: Allocation of local constant arrays
Date: Fri, 21 May 2004 02:32:17 GMT
Date: 2004-05-21T02:32:17+00:00	[thread overview]
Message-ID: <RSdrc.88428$iF6.7613637@attbi_s02> (raw)
In-Reply-To: c8hvcl$eth$1@e3k.asi.ansaldo.it

My opinion:
  It depends on the constants.

  If the constants are configuration values that someone might need to
change during maintenance, I tend to locate these values in an area near the
beginning of the package along with an explanation of their use.  This makes
it convenient for the maintainer.

  If the constants never change and are only relevent to the local function
or procedure, I tend to locate these values within the function or
procedure.

Steve
(The Duck)

"Davide" <ppp@ppp.it> wrote in message
news:c8hvcl$eth$1@e3k.asi.ansaldo.it...
>
> "Robert I. Eachus" <rieachus@comcast.net> ha scritto:
>
> > then put everything as constants in the
> > package body.
>
> As a general way to design the software, if you have constants used only
by
> a procedure, do you prefer (for the final application) to nest them in
that
> procedure or to keep them together with all the other constants in the
> package body, then visible also to procedures not referencing them?
>
> The question, in other words,  is: locate the data closest as possible to
> operations who used them or tend to "globalize" their visibility also when
> not necessary?
>
> Waiting for opinions.
>
> Davide.
>
>





  parent reply	other threads:[~2004-05-21  2:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-19 15:07 Allocation of local constant arrays Davide
2004-05-19 15:17 ` Davide
2004-05-19 21:16 ` Robert I. Eachus
2004-05-20  9:56   ` Davide
2004-05-20 11:24     ` Martin Krischik
2004-05-20 18:36       ` Freejack
2004-05-21  9:44         ` Martin Krischik
2004-05-21  2:32     ` Steve [this message]
2004-05-21  3:07     ` Robert I. Eachus
replies disabled

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