comp.lang.ada
 help / color / mirror / Atom feed
From: stt@inmet.inmet.com
Subject: Re: File I/O Question
Date: 12 Apr 90 14:10:00 GMT	[thread overview]
Message-ID: <20600039@inmet> (raw)
In-Reply-To: 54727@bbn.COM


Regarding reading files with multiple record types:

The language-defined I/O packages don't handle this
kind of file, at least not without standing on your head.
However, it seems to be a little known fact that it is
permissible to write your *own* I/O packages!  

I am only being a little facetious here.  It is important to realize
that the Ada Reference Manual provides only a starting point for I/O services.
It does not define any standard interface to the underlying
O/S I/O services, though most Ada vendors provide such packages.
Even if your vendor doesn't provide such an I/O package, it
is almost always possible to use pragma Interface to Assembler
or C to accomplish the job.  By the way, the Posix/Ada folks are making good
progress on standardizing an Ada interface to Posix (Unix) I/O services.

Perhaps Ada9X will try to directly address some of these very real problems,
but alternatively, it may instead focus on providing the primitives
(refinements to 'ADDRESS, 'SIZE, and unchecked-conversion) so that
application-specific I/O packages will be easier to write in a portable,
compiler-independent way.  In any case, judicious use of 'ADDRESS, 'SIZE,
and Unchecked_Conversion can go a long way already toward easing
the solution to your I/O problems.

S. Tucker Taft
Intermetrics, Inc.
Cambridge, MA  02138

      reply	other threads:[~1990-04-12 14:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1990-04-11 14:03 File I/O Question Dick Koolish
1990-04-12 14:10 ` stt [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox