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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,627a173c3309b242 X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news1.google.com!news.glorb.com!wn14feed!worldnet.att.net!attbi_s02.POSTED!not-for-mail From: "Steve" Newsgroups: comp.lang.ada References: Subject: Re: Allocation of local constant arrays X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Message-ID: NNTP-Posting-Host: 24.21.42.251 X-Complaints-To: abuse@comcast.net X-Trace: attbi_s02 1085106737 24.21.42.251 (Fri, 21 May 2004 02:32:17 GMT) NNTP-Posting-Date: Fri, 21 May 2004 02:32:17 GMT Organization: Comcast Online Date: Fri, 21 May 2004 02:32:17 GMT Xref: controlnews3.google.com comp.lang.ada:725 Date: 2004-05-21T02:32:17+00:00 List-Id: 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" wrote in message news:c8hvcl$eth$1@e3k.asi.ansaldo.it... > > "Robert I. Eachus" 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. > >