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,6286c332c8cae43d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-26 04:13:57 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: hfrumblefoot@yahoo.com (Hambut) Newsgroups: comp.lang.ada Subject: Re: Text_IO.End_Of_File Problem Date: 26 Nov 2001 04:13:57 -0800 Organization: http://groups.google.com/ Message-ID: References: <9tsbca$4g95n$1@ID-25716.news.dfncis.de> NNTP-Posting-Host: 194.131.227.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1006776837 21998 127.0.0.1 (26 Nov 2001 12:13:57 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 26 Nov 2001 12:13:57 GMT Xref: archiver1.google.com comp.lang.ada:16976 Date: 2001-11-26T12:13:57+00:00 List-Id: "Nick Roberts" wrote in message news:<9tsbca$4g95n$1@ID-25716.news.dfncis.de>... > Hambut, the basic answer is: you cannot mix Ada.Sequential_IO and > Ada.Text_IO! The format in which Sequential_IO writes data is > implementation-dependent, and may not even vaguely correspond to anything > that Text_IO can read back. I appreciate this. the reason I mixed the two was to get a small self-contained program to demonstrate my problem. The actual app uses text_io to set the file up, and text_io to read the file. However doing this I managed to get an exception to occur where I didn't expect one. Hence the query. > > I have two questions for you: > > (1) WHY were you trying to write with Sequential_IO and then read with > Text_IO? See above. > > (2) WHAT do you really want to do? > What I really want to do is fairly trivial really (or at least should be), and involves downloading an email, writing it into a file, and then parsing the email to extract attachments etc. Currently I'm downloading the email and saving it into a temporary file, and then later opening it to pull out the attachment. Perhaps my real problem is using text_io to write POP3-type output straight to a file (it adds a load of superfluous line ends I guess), in which case Sequential_IO looks more hopeful. > I will help you with (2) if I can (and if you require). I'm hoping I won't need help with this, but you're offer is much appreciated.