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.1 required=5.0 tests=BAYES_20,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,1042f393323e22da X-Google-Attributes: gid103376,public From: Alan Brain Subject: Re: Any research putting c above ada? Date: 1997/05/13 Message-ID: <337813DF.598C@dynamite.com.au>#1/1 X-Deja-AN: 241060370 References: <208C9C61CA05C32B.65D82DC950AAA33A.D68E7B27EB42E98A@library-proxy.airnews.net> <3372D44E.5F44@sprintmail.com> Organization: @Home Reply-To: aebrain@dynamite.com.au Newsgroups: comp.lang.ada Date: 1997-05-13T00:00:00+00:00 List-Id: Kevin Cline wrote: > I didn't say you would RETURN a reference to a container. > I said you would pass one. > In C++, you would write something like: > > void Read_File_Lines(vector& lines, istream& in) And in Ada-83 even, you just pass the parameter as an _in out_ , which compilers will pass by reference rather than value. You lose a bit in safety (forex the array being passed may be unitialised, so may contain random garbage, which if read inside the procedure will cause interesting results), but gain in efficiency, it's a judgement call that will depend on circumstances. -- aebrain@dynamite.com.au <> <> How doth the little Crocodile | Alan & Carmel Brain| xxxxx Improve his shining tail? | Canberra Australia | xxxxxHxHxxxxxx _MMMMMMMMM_MMMMMMMMM 100026.2014 compuserve o OO*O^^^^O*OO o oo oo oo oo By pulling MAERKLIN Wagons, in 1/220 Scale See http://www.z-world.com/graphics/z/master/8856.gif for picture