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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,56cff81b925fb65b,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!i14g2000yqg.googlegroups.com!not-for-mail From: David Sauvage Newsgroups: comp.lang.ada Subject: Ada 2012 and type access to in out functions Date: Tue, 11 Oct 2011 05:00:37 -0700 (PDT) Organization: http://groups.google.com Message-ID: <43911dcc-5158-46c0-b8c3-505c5e0068eb@i14g2000yqg.googlegroups.com> NNTP-Posting-Host: 41.136.232.176 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1318334535 32765 127.0.0.1 (11 Oct 2011 12:02:15 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 11 Oct 2011 12:02:15 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: i14g2000yqg.googlegroups.com; posting-host=41.136.232.176; posting-account=RLLoCgoAAAAlrjFze52eMRxLw8Zw6JGC User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESNKRC X-HTTP-UserAgent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:22337 Date: 2011-10-11T05:00:37-07:00 List-Id: Using GNAT GPL 2011, I try to define a type that is an access to an in out function, and the following example code [1] is illegal for the compiler. Is it an Ada 2012 restriction on using in out functions, a GNAT GPL 2011 limitation or a bug ? Cheers, [1] -- gnatmake -gnat12 in_out_function_access_type.adb procedure In_Out_Function_Access_Type is function Validate (Status : in out Boolean) return String is begin Status := True; return "command"; end Validate; type Callback is access function (Status : in out Boolean) return String; -- illegal functions can only have "in" parameters. -- build successfully if the above line is commented begin null; end In_Out_Function_Access_Type;