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 Path: g2news2.google.com!postnews.google.com!v2g2000vbb.googlegroups.com!not-for-mail From: Egil Newsgroups: comp.lang.ada Subject: Re: Hiding the value of Constants Date: Sat, 11 Jul 2009 16:31:06 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <30696d63-16e8-44e2-a4a5-db5095d7cfec@m3g2000pri.googlegroups.com> <4a58e74a$0$30233$9b4e6d93@newsspool1.arcor-online.net> NNTP-Posting-Host: 80.203.137.62 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1247355066 32094 127.0.0.1 (11 Jul 2009 23:31:06 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 11 Jul 2009 23:31:06 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: v2g2000vbb.googlegroups.com; posting-host=80.203.137.62; posting-account=P68zsgoAAABKpXKMUuwuUZ_RfBk1kZfB User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:7007 Date: 2009-07-11T16:31:06-07:00 List-Id: On Jul 11, 11:53=A0pm, a...@anon.org (anon) wrote: > In the years, there has been a few people asking how to hide values or co= nstant. > Some say use private which the value is still known. Others say use funct= ions > which can be hidden by removing the source code of the body of the packag= e, > but requires a call runtime routine each time the value is needed. > > But the main problem is that each person who wants to hide a constant for= gets > is that all someone has to do is to write a simple program to print the v= alue. =A0 > So, except to may be getting bonus points from a prof, its a waste of tim= e. > > In my example I just showed a third way. To initialize the value at the > Elaboration time instead of compile or using main runtime. > > Then how about showing an example that is not dependent on the elaboration order? ie, a program that does not use an unitialized value for your Test_Value if a user decides to depend on it for another constant defined in another package (that happens to be elaborated before the body of your Y1).