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: 103376,e528d54e6cc3c10d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!ecngs!feeder.ecngs.de!npeer.de.kpn-eurorings.net!rz.uni-karlsruhe.de!news.uni-stuttgart.de!news.belwue.de!LF.net!news.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: why only in-parameters in functions Date: Wed, 29 Sep 2004 23:12:41 +0200 Message-ID: <87oejoye2e.fsf@deneb.enyo.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: albireo.enyo.de 1096492363 819 212.9.189.171 (29 Sep 2004 21:12:43 GMT) X-Complaints-To: Cancel-Lock: sha1:xPAqgaKV/I/HosK+l4oyzwYjk8U= Xref: g2news1.google.com comp.lang.ada:4407 Date: 2004-09-29T23:12:41+02:00 List-Id: * Alexander E. Kopilovich: > In practice, where you really need in-parameters for a function you may either > use a procedure that returns value (if you use GNAT compiler) or you may use > the construct, presented here in c.l.a by Robert I. Eachus (see his message > in comp.lang.ada from 2003-07-15 with Subject: Re: What evil would happen?) The "Rosen trick" is also relevant in this context (see the archives), but it only works for limited types. However, it should be used whenever possible because it does not involve erroneous execution.