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,c5f73eda096e667b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-07 13:38:12 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: achrist@easystreet.com Newsgroups: comp.lang.ada Subject: Re: Neat and tidy solution to following problem? Date: Tue, 07 May 2002 13:38:45 -0700 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <3CD83B55.75FC2B01@easystreet.com> X-Mailer: Mozilla 4.79 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: newsabuse@supernews.com Xref: archiver1.google.com comp.lang.ada:23675 Date: 2002-05-07T13:38:45-07:00 List-Id: "chris.danx" wrote: > > I'm just wondering if there's a way to have something similar in Ada > 95 like have two items returned from a function but not have to > declare an explicit type. > You would do this in Ada as a procedure (not a function) with multiple in out parameters. I'd be interested to know how well recursion in Ada substitutes for looping (efficiency-wise). Some of the functional languages are not really high performance, and it would be interesting to see if you could get about the same level of performance from the same style of coding using a procedural language. In your example, for example, our spec might say that words are never very long (say more than 50 characters or so), so we wouldn't have to worry about problems with very deep recursions. However, Ada is a procedural language. If you are using Ada, then presumably you are not allergic to procedural devices like looping and in out parameters. A recursive algorithm that eliminates but one level of straightforward looping could be a puzzlement to an Ada reader. Al