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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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!newsrout1.ntli.net!news-in.ntli.net!colt.net!peernews3.colt.net!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Allocation of local constant arrays Date: Fri, 21 May 2004 11:44:28 +0200 Organization: AdaCL Message-ID: <1243344.38CSDDicXX@linux1.krischik.com> References: <17820062.Hog322c0fT@linux1.krischik.com> Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1085132881 07 19145 ZUr5Gb-v0VbBUtO 040521 09:48:01 X-Complaints-To: usenet-abuse@t-online.de X-ID: ZK+Ef+ZCYeyZZbHDPHwCRDhiz3h6OPN7FpgDeVotM2mq9cQQwsvPUz User-Agent: KNode/0.7.7 Xref: controlnews3.google.com comp.lang.ada:735 Date: 2004-05-21T11:44:28+02:00 List-Id: Freejack wrote: > On Thu, 20 May 2004 13:24:07 +0200, Martin Krischik wrote: > >> >> Normally I put them with the procedure. Sometimes I put them in packages >> inside the procededure: >> >> procedure Proc >> is >> package Pack >> ... >> end Pack; >> begin >> ... >> >> With Regards >> >> Martin > > > Wouldn't that kind of declaration essentially make the variables static > constants, unchangeable from one call of the procedure to another. Yes. But beware: if Pack had an evaluation code it would be called with each call to Proc. > And > would I reference the var as Proc.Pack.foobar or just Pack.foobar? Both can be used. > Although it looks like this type of definition would help the compiler > perform optimizations. That's the idea. Usually I just trust the compiler to do it right. With Regards Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com