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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8623fab5750cd6aa X-Google-Attributes: gid103376,public Path: g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!cyclone1.gnilink.net!spamkiller2.gnilink.net!gnilink.net!nwrdny01.gnilink.net.POSTED!0e8a908a!not-for-mail From: Hyman Rosen User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada BIND was: Improving Ada's image - Was: 7E7 Flight Controls Electronics References: <40b9c99e$0$268$edfadb0f@dread16.news.tele.dk> <1086715817.122983@master.nyc.kbcfp.com> <1086733411.736049@master.nyc.kbcfp.com> <3Auxc.11998$XY6.1296622@read2.cgocable.net> <40C85035.4020706@noplace.com> <40CA0032.3010103@noplace.com> <40CAF0E1.4000904@noplace.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Mon, 14 Jun 2004 02:09:36 GMT NNTP-Posting-Host: 68.160.235.247 X-Complaints-To: abuse@verizon.net X-Trace: nwrdny01.gnilink.net 1087178976 68.160.235.247 (Sun, 13 Jun 2004 22:09:36 EDT) NNTP-Posting-Date: Sun, 13 Jun 2004 22:09:36 EDT Xref: g2news1.google.com comp.lang.ada:1456 Date: 2004-06-14T02:09:36+00:00 List-Id: Robert I. Eachus wrote: > Check the length of the string to be read, then read either that > number of characters or the maximum buffer size. Of course, this means > in many cases you have to read the string twice while Ada allows you to > read it once. (Ask for N characters and get a count of how many you get.) Huh? fread, fgets, istream.getline, istream.read are all ways of reading up to a pre-determined amount of data into a buffer in C and C++. In no case does the string need to be read twice. What a bizarre claim!