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,386228a37afe967f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-17 13:53:48 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!uninett.no!ntnu.no!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: Re: Computer Language Shootout Date: Thu, 17 Jul 2003 20:53:48 +0000 (UTC) Organization: Norwegian university of science and technology Message-ID: References: <1ec946d1.0307150715.4ba69f85@posting.google.com> <3F149243.80304@attbi.com> <3F15930C.2070907@attbi.com> NNTP-Posting-Host: kiuk0152.chembio.ntnu.no X-Trace: tyfon.itea.ntnu.no 1058475228 17199 129.241.83.78 (17 Jul 2003 20:53:48 GMT) X-Complaints-To: usenet@itea.ntnu.no NNTP-Posting-Date: Thu, 17 Jul 2003 20:53:48 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:40436 Date: 2003-07-17T20:53:48+00:00 List-Id: Wesley Groleau wrote: > I often use a function, which reads > from the file into a temporary, > and then returns Temp (1 .. Last) > > The difficulty is knowing how big to make > the temporary. > > The benefit is that the function can be used > in a declaration, relieving the client from > dealing with that difficulty. I agree, but as I use this for reading files I usually have a predefined string that I read each line into, then parse it and then read next line, so I really don't need a function to do it :-) However functions are nice for this you described and other circumstances. -- Ada95 is good for you. http://www.crystalcode.com/codemage/MainMenu/Coding/Ada/IntroducingAda.php