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,73175d2d01a1b1dd X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news3.google.com!feeder.news-service.com!ramfeed-2.ams.xsnews.nl!feed.xsnews.nl!border-3.ams.xsnews.nl!feeder.news-service.com!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: subprogram must not be deeper than access type Date: Tue, 4 Oct 2011 09:58:21 +0200 Organization: cbb software GmbH Message-ID: References: <818752663338654817.822041rmhost.bauhaus-maps.arcor.de@news.arcor.de> <15r7hdzgyr0fc.1djn7vwy23dfg$.dlg@40tude.net> <1uqthqxzri6j3.i18ifhbwmzdc.dlg@40tude.net> <10bj41auuxi17$.42qw3wdubqn3.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: g2news2.google.com comp.lang.ada:22233 Date: 2011-10-04T09:58:21+02:00 List-Id: On Tue, 04 Oct 2011 06:26:01 +0200, Yannick Duchêne (Hibou57) wrote: > Le Tue, 27 Sep 2011 09:52:09 +0200, Dmitry A. Kazakov > a écrit: >> Compare it with declare-begin-end blocks they too have no names and have no >> identifiable counterpart in the domain, just an implementation detail. > Except these are just flowed. If you want a block to be possibly invoked > independently, then you make it a procedure, … which is named. There is no clear margin, but the name of a procedure may refer to its name and/or its singleton type. They are not separated properly, because Ada has no procedural types. BTW, blocks can be named in Ada: A : begin null; end A; Here A is the proper name, and you don't need the type of A. This type is anonymous. > If you do not need to access sub‑records of a record, Access to the subrecord is needed, but only though its components not as a whole. These components would be named but have anonymous types. ------------------------------ BTW, the list of parameters of a subprogram is an anonymous record type, but Ada does not require its explicit declaration, e.g. type Integer_Tuple is record Left : Integer; Right : Integer; end record; function "+" : Integer_Tuple return Integer; If it could, you would have so much longed variant arguments: type Printf_Arguments (Some_Discriminant : ...) is record case Some_Discriminant is when ... => when ... => ... end case; end record; pragma Unchecked_Union (Printf_Arguments); procedure Printf : Printf_Arguments; (:-)) -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de