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.0 required=5.0 tests=BAYES_20,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!d9g2000prh.googlegroups.com!not-for-mail From: Rick Newsgroups: comp.lang.ada Subject: 'private' and Privacy Date: Tue, 7 Jul 2009 19:48:56 -0700 (PDT) Organization: http://groups.google.com Message-ID: <843a36b0-041d-4826-98b4-0fbcb1a4d287@d9g2000prh.googlegroups.com> NNTP-Posting-Host: 123.3.179.68 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1247021336 14715 127.0.0.1 (8 Jul 2009 02:48:56 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 8 Jul 2009 02:48:56 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d9g2000prh.googlegroups.com; posting-host=123.3.179.68; posting-account=q18aiAoAAADbiIPIlD5R8oYVGhuoBvVA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:6893 Date: 2009-07-07T19:48:56-07:00 List-Id: I have never fathomed out why we declare entities in packages to be 'private' and then have to go and tell the world what is in them. I would assume that 'private' has something to do with 'information hiding' yet we expose what is 'private'. I have: KEYPAD_ROWS_COUNT : constant Positive := 2; -- The number of rows on a keypad. KEYPAD_COLUMNS_COUNT : constant Positive := 2; -- The number of columns on a keypad. type Keys_Type is array (1 .. KEYPAD_ROWS_COUNT, 1 .. KEYPAD_COLUMNS_COUNT) of Gtk.Key_Button_Pkg.Gtk_Key_Button_Access; --Intermediate, addressable storage of keys for the keypad. I am trying to find a way to ensure that the user only addresses items in the array in the manner I provide rather than making use of the information clearly visible about the range of the array. I can use functions instead of constants to define array range values but they have to be fully declared before I define the array - and this exposes that which I wish to remain private (the actual range). Isn't this a contradiction in terms, or _is_ there a way to retain 'Privacy'? -------------------------------------------- Rick Duley North Perth, Western Australia http://rickduley.webs.com .-_|\ / \ perth *_.-._/ v aussie : 0409 106 049 o'seas : +61 409 106 049 -------------------------------------------- "Answers are easy; it's asking the right questions which is hard." The Doctor (Dr Who: The Face of Evil (1977)"