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,718bd701b6b36346 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-14 07:53:51 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!193.174.75.178!news-fra1.dfn.de!news.man.poznan.pl!pwr.wroc.pl!panorama.wcss.wroc.pl!hebisch From: hebisch@math.uni.wroc.pl (Waldek Hebisch) Newsgroups: comp.lang.ada Subject: Re: GNAT/Ada95 Streams Performance Issue Date: 14 Aug 2002 14:53:59 GMT Organization: Politechnika Wroclawska Message-ID: References: <3D51ECC9.8020406@cogeco.ca> <5ee5b646.0208121549.6840b712@posting.google.com> NNTP-Posting-Host: hera.math.uni.wroc.pl X-Trace: panorama.wcss.wroc.pl 1029336839 11338 156.17.86.1 (14 Aug 2002 14:53:59 GMT) X-Complaints-To: abuse@news.pwr.wroc.pl NNTP-Posting-Date: 14 Aug 2002 14:53:59 GMT X-Newsreader: TIN [version 1.2 PL2] Xref: archiver1.google.com comp.lang.ada:28023 Date: 2002-08-14T14:53:59+00:00 List-Id: Robert Dewar (dewar@gnat.com) wrote: : hebisch@math.uni.wroc.pl (Waldek Hebisch) wrote in message news:... : > loop : > Ada.Text_IO.Get_Line( Line, Last ); : > Ada.Text_IO.Put_Line( Line(1..Last) ); : > end loop; : This is nothing *like* a "raw cat" program, it has quite : subtle semantics that you likely do not intend :-) The goal is NOT to copy files, it is just a skeleton for a program which works with a file line-by-line. I know that the program mishandles long lines, and that Ada treats control chars differently then C. Is there anything more subtle going on? And is there a better standard way to read a line? I find it somewhat disturbing that reading a line take more CPU time then simple processing. -- Waldek Hebisch hebisch@math.uni.wroc.pl or hebisch@hera.math.uni.wroc.pl