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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c9d5fc258548b22a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!n16g2000prc.googlegroups.com!not-for-mail From: Shark8 Newsgroups: comp.lang.ada Subject: Re: How do I write directly to a memory address? Date: Wed, 9 Feb 2011 09:46:59 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <67063a5b-f588-45ea-bf22-ca4ba0196ee6@l11g2000yqb.googlegroups.com> <4d5031fe$0$6765$9b4e6d93@newsspool3.arcor-online.net> <1f229967-d3cf-42b6-8087-c97ee08652f3@i40g2000yqh.googlegroups.com> <4d51169e$0$7657$9b4e6d93@newsspool1.arcor-online.net> <1bnp0pw1c8r5b$.guxc48qweiwe.dlg@40tude.net> <1ju2bba947c1h.y05qev0wjx2t.dlg@40tude.net> <25z0jyvibze7.1pi559yfki5lo$.dlg@40tude.net> <611bc17f-753c-48bb-9c28-dc5e810085dc@q40g2000prh.googlegroups.com> <4d52c3c5$0$19486$882e7ee2@usenet-news.net> <0be28ab4-84dc-4245-b6f7-264baaed776d@8g2000prt.googlegroups.com> <4d52cc67$0$19481$882e7ee2@usenet-news.net> NNTP-Posting-Host: 174.28.151.164 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1297273620 16367 127.0.0.1 (9 Feb 2011 17:47:00 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 9 Feb 2011 17:47:00 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: n16g2000prc.googlegroups.com; posting-host=174.28.151.164; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729; .NET4.0E),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:18070 Date: 2011-02-09T09:46:59-08:00 List-Id: On Feb 9, 10:15=A0am, Hyman Rosen wrote: > Oddly, the spec contains > comments mostly for procedures which are commented as "shouldn't > be called directly". (Is there no way to express such things in Ada > so that things that shouldn't be called directly can't be called > directly?) Yes, there is a way to prevent some function or procedure from being called directly FROM CLIENT CODE. Package Example is Type something is null record; Procedure Public_Procedure( Input : In something ); private Procedure Private_Procedure( Input : In something ); end Example; Private_Procedure is completely uncallable from a client using this spec. There is, however a "workaround" that would in essence directly call it. Package Example.Child is Procedure Public_Procedure_Alias( Input : In something ); end Example.Child; Package Body Example.Child is Procedure Public_Procedure_Alias( Input : In something ) is begin Public_Procedure( Input ); end; -- "Procedure Public_Procedure_Alias( Input : In something ) -- Renames Public_Procedure;" or something of a similar -- syntax may also be possible. {I'm fuzzy on function/procedure -- renaming rules.} end Example.Child; Those comments may be of the effect that in child-packages those functions & procedures are not to be directly exposed to the client.