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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a00006d3c4735d70 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-23 11:50:51 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!proxad.net!usenet-fr.net!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: "Alexandre E. Kopilovitch" Newsgroups: comp.lang.ada Subject: Re: In-Out Parameters for functions Date: Fri, 23 Jan 2004 22:05:22 +0300 (MSK) Organization: Cuivre, Argent, Or Message-ID: References: <5ad0dd8a.0401230601.65ce0a77@posting.google.com> NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: melchior.cuivre.fr.eu.org 1074885018 52544 80.67.180.195 (23 Jan 2004 19:10:18 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Fri, 23 Jan 2004 19:10:18 +0000 (UTC) To: comp.lang.ada@ada-france.org Return-Path: In-Reply-To: <5ad0dd8a.0401230601.65ce0a77@posting.google.com>; from Wojtek Narczynski at 23 Jan 2004 06:01:13 -0800 X-Mailer: Mail/@ [v2.44 MSDOS] X-Virus-Scanned: by amavisd-new-20030616-p5 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.3 Precedence: list List-Id: Gateway to the comp.lang.ada Usenet newsgroup List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:4740 Date: 2004-01-23T22:05:22+03:00 Wojtek Narczynski wrote: > I don't follow, and I would like to, because I find [IN] OUT params > for functions very useful. Could you please elaborate on that a bit > more? > > > And only one seems still valid: it is about > > complex expressions where a function call may be used as an actual argument > > for another function. I believe that that objection will be covered by the > > following 3rd rule for IN OUT parameters for functions: > > > > 3) in a function call, an actual argument that corresponds to IN OUT formal > > parameter must be a variable, and must be preceeded by the keyword VAR. > > > > For example: > > > > X := Random(var Y); > > > > With this rule any confusion becomes improbable, and readability flourishes. > > I don't get clear - which point should be elaborated? (for me all that looks pretty straightforward, complete and unambiguous -:) > Looks like you are proposing a new keyword, Actually no - it was more a part of live discussion, then a polished proposal, so "var" there was just an example of what may be used there. Although I am not so frightened by new keywords, in this particular case there is no strong need of one: for example, ACCEPT reserved word may be used here: X := Random(accept Y); or simply IN OUT: X := Random(in out Y); so just choose what you like better -:) > PS. When I last raised this issue, Randy Buckhard was kind enough to > explain it to me in this post: > ... > And asked wether we "havd to discuss this AGAIN?" I don't think that here is any problem. Certainly, Ada language designers have a good reason to sigh when this issue pops up again. But nevertheless, we programmers not only have a right to discuss the language issues that disturb us, but even must do that. Alexander Kopilovitch aek@vib.usr.pu.ru Saint-Petersburg Russia