comp.lang.ada
 help / color / mirror / Atom feed
From: Egil <egilhovik@hotmail.com>
Subject: Re: Hiding the value of Constants
Date: Sat, 11 Jul 2009 16:31:06 -0700 (PDT)
Date: 2009-07-11T16:31:06-07:00	[thread overview]
Message-ID: <c6db8cf5-f38e-49af-a746-466b6e237bb8@v2g2000vbb.googlegroups.com> (raw)
In-Reply-To: fR76m.109597$d36.74475@bgtnsc04-news.ops.worldnet.att.net

On Jul 11, 11:53 pm, a...@anon.org (anon) wrote:
> 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.
>
> 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.  
> So, except to may be getting bonus points from a prof, its a waste of time.
>
> 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).





      parent reply	other threads:[~2009-07-11 23:31 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-07  8:48 Hiding the value of Constants Rick
2009-07-07  8:54 ` xavier grave
2009-07-07  8:58   ` AdaMagica
2009-07-07  9:41 ` Georg Bauhaus
2009-07-07 10:41   ` Hibou57 (Yannick Duchêne)
2009-07-07 15:51     ` Adam Beneschan
2009-07-07 16:26       ` Hibou57 (Yannick Duchêne)
2009-07-07 18:48       ` Dmitry A. Kazakov
2009-07-07 19:05         ` Adam Beneschan
2009-07-07 19:53           ` Dmitry A. Kazakov
2009-07-07 20:28             ` Adam Beneschan
2009-07-07 20:57               ` Dmitry A. Kazakov
2009-07-08 10:25                 ` Georg Bauhaus
2009-07-08 12:20                   ` Dmitry A. Kazakov
2009-07-09 23:04 ` anon
2009-07-10  6:37   ` AdaMagica
2009-07-11 19:06     ` anon
2009-07-11 19:26       ` Georg Bauhaus
2009-07-11 21:53         ` anon
2009-07-11 22:03           ` Albrecht Käfer
2009-07-11 22:15           ` Ed Falis
2009-07-15  9:30             ` anon
2009-07-11 23:31           ` Egil [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox