From: hfrumblefoot@yahoo.com (Hambut)
Subject: Re: Text_IO.End_Of_File Problem
Date: 26 Nov 2001 04:13:57 -0800
Date: 2001-11-26T12:13:57+00:00 [thread overview]
Message-ID: <fb75c450.0111260413.47679833@posting.google.com> (raw)
In-Reply-To: 9tsbca$4g95n$1@ID-25716.news.dfncis.de
"Nick Roberts" <nickroberts@adaos.worldonline.co.uk> 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.
next prev parent reply other threads:[~2001-11-26 12:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-25 22:42 Text_IO.End_Of_File Problem Hambut
2001-11-26 1:53 ` Jeffrey Carter
2001-11-26 12:30 ` Hambut
2001-11-26 16:50 ` Mark Biggar
2001-11-26 13:25 ` Hambut
2001-11-26 2:15 ` Patrick Hohmeyer
2001-11-26 12:36 ` Hambut
2001-11-26 2:35 ` Nick Roberts
2001-11-26 12:13 ` Hambut [this message]
2001-11-26 18:00 ` Nick Roberts
2001-11-27 9:51 ` Hambut
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox