comp.lang.ada
 help / color / mirror / Atom feed
From: awdorrin <awdorrin@gmail.com>
Subject: Re: Writing Data to a file
Date: Thu, 15 Dec 2011 11:23:02 -0800 (PST)
Date: 2011-12-15T11:23:02-08:00	[thread overview]
Message-ID: <530c4f5e-3c00-4ad5-92de-a4faefad468d@p16g2000yqd.googlegroups.com> (raw)
In-Reply-To: 87zketwure.fsf@ludovic-brenta.org


>
> Note that you have not specified what it is that Buf is supposed to
> contain; you seem to assume that an explicit conversion to
> Stream_Element_Array is necessary.  It is not; given a stream you might
> as well use the stream-oriented attributes (ARM 13.13.2):


The buffer is a block of memory that contains data, it could be text,
integers, bytes, floating point numbers, whatever.
The AREA_PTR is the starting address of the memory block.
READ_OFFSET is the location within that block that we want to start
reading from while
WRITE_OFFSET is the last location in the buffer that was written to.

So since all I have is a System.Address and offsets, I believe I have
to cast/convert this a Stream_Element_Array.

If I could only access POSIX.IO's write 'function', rather than the
procedures, I wouldn't have to go through these hoops.
Of course, that write function is the equivalent of what I'm trying to
replace...

I'm not sure I see how the Stream_IO package could be used directly
for this.






  reply	other threads:[~2011-12-15 19:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-15 18:13 Writing Data to a file awdorrin
2011-12-15 18:32 ` Ludovic Brenta
2011-12-15 19:23   ` awdorrin [this message]
2011-12-16  0:55     ` Randy Brukardt
2011-12-16 13:30     ` Jacob Sparre Andersen
replies disabled

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