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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,524c88695fa43591 X-Google-Attributes: gid103376,public From: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: Learning Ada & a question Date: 2000/04/11 Message-ID: <2000Apr11.062413.1@eisner>#1/1 X-Deja-AN: 609589849 References: <38F2E992.EDB2DCCE@interact.net.au> X-Trace: news.decus.org 955448658 3178 KILGALLEN [216.44.122.34] Organization: LJK Software Reply-To: Kilgallen@eisner.decus.org.nospam Newsgroups: comp.lang.ada Date: 2000-04-11T00:00:00+00:00 List-Id: In article <38F2E992.EDB2DCCE@interact.net.au>, G writes: > and then work the meaning out from there. As there are many more books > out there > on C++, it gives me a broader view of things. I live in Australia and > have to order books from overseas if I want texts on Ada. (Hard copies > are more comfortable). In the US many people order Ada text by mail, and although delivery may be quicker the principle in the same. Yes, I find Ada books in a few technical bookstores around Boston, but unfortunately they are usually books I already own. > In C++ they have devised all these ingenious little techniques for > getting more than one return value from a function. I am just wrapping > my mind around the notion of pass-by-reference with pointers and > references. I know that access types are a sort of pointer in Ada. Can > you do the same things in Ada ? Do you need to when Procedures can be > called just as easily as functions anyways and return as many things as > you need ? (I maybe didnt say that right). In my experience writing a procedure with OUT (or IN OUT) parameters is much easier than writing a data structure with multiple components to be returned. There are certainly cases where I use the technique involving a data structure, but that is mainly where the data structure must be used by many different procedures and functions in the program.