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.7 required=5.0 tests=BAYES_00,MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,95c23095599677a5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-21 20:22:04 PST Path: supernews.google.com!sn-xit-03!supernews.com!freenix!teaser.fr!nerim.net!isdnet!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: Robert Dewar Newsgroups: comp.lang.ada Subject: Re: Optimization Question Date: Mon, 22 Jan 2001 04:05:08 GMT Organization: Deja.com Message-ID: <94gbhi$mao$1@nnrp1.deja.com> References: <94ftfu$b59$1@nnrp1.deja.com> <94g431$ge3$1@nnrp1.deja.com> <94g920$k64$1@nnrp1.deja.com> NNTP-Posting-Host: 205.232.38.14 X-Article-Creation-Date: Mon Jan 22 04:05:08 2001 GMT X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; U) X-Http-Proxy: 1.0 x71.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 X-MyDeja-Info: XMYDJUIDrobert_dewar Xref: supernews.google.com comp.lang.ada:4294 Date: 2001-01-22T04:05:08+00:00 List-Id: In article <94g920$k64$1@nnrp1.deja.com>, dvdeug@my-deja.com wrote: > Unfortunately, that "perfectly gruesome manner" is the only > one that jumps out at me. I don't want to use Ada.Text_IO, > because I want control of CR's and LF's. Using sequential I/O is horribly inefficient AND non-portable. You have no way of knowing the format of such a file, and to assume that individual characters are read as records is an asumption not warranted by the RM (though it likely may work). The proper approach is to use stream_io here, and read in giant chunks of the file. Sent via Deja.com http://www.deja.com/