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-Thread: a07f3367d7,46b760ffb623378c X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!inka.de!rz.uni-karlsruhe.de!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail From: Albrecht =?ISO-8859-1?Q?K=E4fer?= Newsgroups: comp.lang.ada Subject: Re: Hiding the value of Constants Date: Sun, 12 Jul 2009 00:03:58 +0200 Organization: 1&1 Internet AG Message-ID: References: <30696d63-16e8-44e2-a4a5-db5095d7cfec@m3g2000pri.googlegroups.com> <4a58e74a$0$30233$9b4e6d93@newsspool1.arcor-online.net> NNTP-Posting-Host: p54bc8501.dip0.t-ipconnect.de Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: online.de 1247350236 31536 84.188.133.1 (11 Jul 2009 22:10:36 GMT) X-Complaints-To: abuse@einsundeins.com NNTP-Posting-Date: Sat, 11 Jul 2009 22:10:36 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.21) Gecko/20090403 SeaMonkey/1.1.16 Mnenhy/0.7.5.0 Hamster-Pg/1.25.2.0 In-Reply-To: Xref: g2news2.google.com comp.lang.ada:7004 Date: 2009-07-12T00:03:58+02:00 List-Id: anon schrieb: > In the years, there has been a few people asking how to hide values or constant. > Some say use private which the value is still known. Others say use functions > which can be hidden by removing the source code of the body of the package, > but requires a call runtime routine each time the value is needed. Not necessarily. There's something called "optimizer" for things like these. > But the main problem is that each person who wants to hide a constant forgets > is that all someone has to do is to write a simple program to print the value. Er ... what? > In my example I just showed a third way. To initialize the value at the > Elaboration time instead of compile or using main runtime. But you do know why constants are called constants, right? How exactly was your example declaring a constant? Albrecht