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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.glorb.com!feeder.erje.net!news.musoftware.de!wum.musoftware.de!news.weisnix.org!newsfeed.ision.net!newsfeed2.easynews.net!ision!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Tue, 07 Jul 2009 11:41:11 +0200 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Hiding the value of Constants References: <30696d63-16e8-44e2-a4a5-db5095d7cfec@m3g2000pri.googlegroups.com> In-Reply-To: <30696d63-16e8-44e2-a4a5-db5095d7cfec@m3g2000pri.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4a531837$0$30227$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 07 Jul 2009 11:41:11 CEST NNTP-Posting-Host: 25acfb47.newsspool1.arcor-online.net X-Trace: DXC=FQ[6^VMCJQn9kIfcjg:0fdic==]BZ:afn4Fo<]lROoRa^YC2XCjHcbiQMh\\V]IH0b;9OJDO8_SKfNSZ1n^B98ijWHlXRP7WJPi X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:6875 Date: 2009-07-07T11:41:11+02:00 List-Id: Rick schrieb: > Is it possible to declare a constant in a package specification > without the user knowing the value of that constant? I'm assuming you do not want the value to be visible neither in the private part nor in the public part of the package specification? Use a function then, and make the package pure, if possible: package P is pragma pure; type Thing is ...; function My_Constant return Thing; pragma Inline(My_constant); end P; Chances are that the compiler might be able to act as if My_Constant was a simple constant.