comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: AI-248 and counting the elements in an external file
Date: Tue, 27 May 2003 15:19:10 -0500
Date: 2003-05-27T15:19:10-05:00	[thread overview]
Message-ID: <vd7hvtd5dkqr17@corp.supernews.com> (raw)
In-Reply-To: IotFSwj$YeLp@eisner.encompasserve.org

Larry Kilgallen wrote in message ...
>In article <3ECFEB59.4010401@attbi.com>, "Robert I. Eachus"
<rieachus@attbi.com> writes:
>> Larry Kilgallen wrote:
>>
>>> Meaning it is permissible to return the number of 512-byte disk
blocks
>>> (or file-specific-size tape blocks) for this function on VMS ?  Or
is the
>>> answer supposed to be normalized to bytes even though the number of
>>> overhead bytes required (and thus the file size) will vary, for
instance,
>>> when copying a file from disk to tape ?
>>
>> Let me answer differently.  VMS supports many file formats.  Ada
stream
>> files would map nicely to VMS record oriented ANSI tape files.  There
>> are other VMS formats that I would not tend to support stream files
for.
>
>But my understanding is that the Ada.Directory functions are to support
>all files that might be accessed from Ada, and that is not limited to
>stream files, nor to files written by Ada.

The intent is that it be well-defined (which might include raising
Use_Error if if cannot be figured out, as for a keyboard) for files that
can be read or written by Ada. If Ada doesn't understand the files at
all, then we're not trying to say anything.

I would expect that this functionality would take more work on some OSes
than it does on Windows or Unix. On the original CP/M, for instance, you
had to figure out the file size by finding out the block size and
multiplying it by the number of blocks. That's fine, and keep in mind
that this result really is intended to report the physical size of the
file, which may or may not be directly relatable to the 'logical' size
returned by Direct_IO.Size and Stream_IO.Size.

             Randy.





  reply	other threads:[~2003-05-27 20:19 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-21  0:07 'Write attribute vs Write procedure Jano
2003-05-21  0:42 ` tmoran
2003-05-21  7:48   ` Ole-Hjalmar Kristensen
2003-05-21  9:23   ` Ole-Hjalmar Kristensen
2003-05-21 16:22     ` tmoran
2003-05-22  7:51       ` Ole-Hjalmar Kristensen
2003-05-21 16:24     ` tmoran
2003-05-21 21:17     ` Simon Wright
2003-05-22  8:02       ` Ole-Hjalmar Kristensen
2003-05-22 13:49       ` Marc A. Criley
2003-05-22 20:07         ` Simon Wright
2003-05-23  6:09   ` Craig Carey
2003-05-23 19:55     ` Simon Wright
2003-05-23 20:48       ` AI-248 and counting the elements in an external file Larry Kilgallen
2003-05-23 21:12         ` Stephen Leake
2003-05-23 21:45           ` Randy Brukardt
2003-05-24  1:45             ` Larry Kilgallen
2003-05-24 22:00               ` Robert I. Eachus
2003-05-25  3:54                 ` Larry Kilgallen
2003-05-27 20:19                   ` Randy Brukardt [this message]
2003-05-27 20:57                     ` Larry Kilgallen
2003-05-28 18:26                       ` Randy Brukardt
2003-05-24  1:42           ` Larry Kilgallen
2003-05-28 21:17             ` Brian Gaffney
2003-05-28 22:06               ` Larry Kilgallen
2003-05-24 14:11 ` 'Write attribute vs Write procedure Craig Carey
replies disabled

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