From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c9019477667b9c0f X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.212.232 with SMTP id nn8mr5808624pbc.1.1323976984148; Thu, 15 Dec 2011 11:23:04 -0800 (PST) Path: lh20ni26314pbb.0!nntp.google.com!news2.google.com!postnews.google.com!p16g2000yqd.googlegroups.com!not-for-mail From: awdorrin Newsgroups: comp.lang.ada Subject: Re: Writing Data to a file Date: Thu, 15 Dec 2011 11:23:02 -0800 (PST) Organization: http://groups.google.com Message-ID: <530c4f5e-3c00-4ad5-92de-a4faefad468d@p16g2000yqd.googlegroups.com> References: <344d32d6-a667-407c-bb8e-e0c504e91688@u32g2000yqe.googlegroups.com> <87zketwure.fsf@ludovic-brenta.org> NNTP-Posting-Host: 192.91.171.42 Mime-Version: 1.0 X-Trace: posting.google.com 1323976984 13403 127.0.0.1 (15 Dec 2011 19:23:04 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 15 Dec 2011 19:23:04 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p16g2000yqd.googlegroups.com; posting-host=192.91.171.42; posting-account=YkFdLgoAAADpWnfCBA6ZXMWTz2zHNd0j User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESRCNK X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20100101 Firefox/8.0,gzip(gfe) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2011-12-15T11:23:02-08:00 List-Id: > > 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. =A0It 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.