* Re: File I/O Question
1990-04-11 14:03 File I/O Question Dick Koolish
@ 1990-04-12 14:10 ` stt
0 siblings, 0 replies; 2+ messages in thread
From: stt @ 1990-04-12 14:10 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 2+ messages in thread