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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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!news1.google.com!news.glorb.com!wn13feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: Hiding the value of Constants Reply-To: anon@anon.org (anon) References: <30696d63-16e8-44e2-a4a5-db5095d7cfec@m3g2000pri.googlegroups.com> <4a58e74a$0$30233$9b4e6d93@newsspool1.arcor-online.net> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Sat, 11 Jul 2009 21:53:15 GMT NNTP-Posting-Host: 12.65.162.18 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1247349195 12.65.162.18 (Sat, 11 Jul 2009 21:53:15 GMT) NNTP-Posting-Date: Sat, 11 Jul 2009 21:53:15 GMT Organization: AT&T Worldnet Xref: g2news2.google.com comp.lang.ada:7003 Date: 2009-07-11T21:53:15+00:00 List-Id: 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. You need to spead your weekends learning a few ticks of the trade about Ada. The program works. Just play with it, you might learn that using functions or private section to hide a value is not the only way. In <4a58e74a$0$30233$9b4e6d93@newsspool1.arcor-online.net>, Georg Bauhaus writes: >anon wrote: >> Like I sometime say, this preson could be a student so, you show >> him part of the answer but not al . > >Yes. But in this case it seems fair to conclude, >after reading the OP's messages, that there is no basis >for an assumption like this. So this sounds kind of inadequate, >at best, pardon me. > >> It works, and it will work if you >> change the statement by using "constant" too. > >No, it doesn't ... > >> But you may have to >> add a couple of other statements, > >.... Yes... > >> or not. > >No... > >Teaching by creative progression using intermittent reinforcement >is probably not a good excuse for the teacher missing the point? >In particular when the "pupil" demonstrates prior knowledge beyond >the above assumption ("my trusty Ada 95 Q&S guide...", he said, e.g.). >Please.