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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c01667c07f51ded5 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!not-for-mail From: france.suisse@gmail.com (Steph-ADA) Newsgroups: comp.lang.ada Subject: Re: Advanced file manipulation (multiple question) Date: 2 Mar 2005 02:31:55 -0800 Organization: http://groups.google.com Message-ID: <74a78c42.0503020231.1dc804b6@posting.google.com> References: <74a78c42.0503010130.785f178f@posting.google.com> NNTP-Posting-Host: 80.125.246.41 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1109759515 9143 127.0.0.1 (2 Mar 2005 10:31:55 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 2 Mar 2005 10:31:55 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:8584 Date: 2005-03-02T02:31:55-08:00 List-Id: Hello! Thanks for your helpful advices, and sorry for 1/my english, 2/abscence of details and 3/my error about Lady Lovelace name, Ada (and not ADA or anything else). I Hope this next post would be better :) So, first, my OS: Windows 2000 Pro. I use Gnat 3.15 (public). I started Ada as a student, with few advices and then... concurrent programming the next week (semaphore etc...), that was rather... hard, for beginners! So, my excuse if I don't know how call OS functions... maybe you have links where I can find tutorials about this ? > If you use Ada.Direct_Io, there is a nice way to read the file in one read, > but it takes two steps. > First create an instance of Ada.Direct_Io of bytes. > Open the file as bytes. > Use the size function to get the size of the file. > Close the file > Create an instance of Ada.Direct_IO with an element that is the size of > the file (an array of bytes maybe?). > Read the file (a single read) > Close the file. This answer seems easier for me, and I'll add a "compare-file" procedure... I'm a bit paranoid :) Thanks a lot for your help Steph