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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9245b8db9abd376c X-Google-Attributes: gid103376,public X-Google-Thread: 11232c,bde6489d2ec79329 X-Google-Attributes: gid11232c,public X-Google-ArrivalTime: 2002-04-16 21:40:36 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn14eed!wn1feed!worldnet.att.net!135.173.83.54!bgtnsc04-news.ops.worldnet.att.net.POSTED!not-for-mail Message-ID: <3CBCFCC8.6000206@worldnet.att.net> From: Jim Rogers User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: comp.lang.ada,misc.misc Subject: Re: Out parameters in a function References: <4519e058.0204150709.55c94dfb@posting.google.com> <3cbbe583.3628858@news.demon.co.uk> <3cbc3f05.26543327@news.demon.co.uk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 17 Apr 2002 04:40:35 GMT NNTP-Posting-Host: 12.86.32.140 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1019018435 12.86.32.140 (Wed, 17 Apr 2002 04:40:35 GMT) NNTP-Posting-Date: Wed, 17 Apr 2002 04:40:35 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:22633 misc.misc:6431 Date: 2002-04-17T04:40:35+00:00 List-Id: Kent Paul Dolan wrote: > "John McCabe" wrote: > > > type of thing, but I can't remember off-hand how you would use a > > returned status with multiple return values! > > Well, if I'm not inventing capabilities, in C the syntax is fairly > direct (and forgive that with several dozen languages mixed in my head I > cannot write any one correctly without manual in lap, which I don't have > these days): > > if > ( > ( > aSomestructTypedVariable = > aSomestructReturningFunction > ( > lots, > of, > parms > ) > ).booleanPart > ) > { > usefulVal = aSomestructTypedVariable.usefulPart; > } > > Does Ada support a similar "assignment en passant" mechanism? > > xanthian. > > (Does C return structures, for that matter?) Well, almost. C does not have a boolean type. C (since its first ANSI standard) does support returning structures. It could always return a pointer to a structure. Ada does not have the same sense of expressions as C. Specifically, an assignment operator in Ada does not return a value. Jim Rogers