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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Your wish list for Ada 202X Date: Tue, 15 Apr 2014 10:41:16 +0200 Organization: A noiseless patient Spider Message-ID: References: <7f1c01c5-3563-4b94-9831-152dbbf2ecdc@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 15 Apr 2014 08:41:15 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="23dab0694e4174fdc880833ec67fa650"; logging-data="19829"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Opo025TNFYIUer2nTE8i6" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: Cancel-Lock: sha1:n26I3x+jUyBXOITqoNNKrnun1wY= X-Enigmail-Version: 1.6 Xref: news.eternal-september.org comp.lang.ada:19308 Date: 2014-04-15T10:41:16+02:00 List-Id: Le 15/04/2014 00:36, Shark8 a écrit : > Perhaps a way to use a procedure as a function, now that functions can > have in/in-out parameter modes. Maybe with syntax like: > > Procedure Y( Input : in In_type; > State : in out State_Type; > Output : out Out_Type ); > Function X renames Y with return Output; > > -- Function X being roughly equivalent to the following: > Function X ( Input : in In_type; > State : in out State_Type) > return Out_Type is > begin > Return Result : Out_Type do > Y( Input => Input, State => State, Output => Result ); > end return; > end X; It is not equivalent. If, for example, Out_Type is an unconstrained array type, the procedure has access to (and must obey by) the constraint of the parameter, while a function can return an object of any size. -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr