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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham 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.73.229 with SMTP id o5mr7964295pbv.7.1324042248556; Fri, 16 Dec 2011 05:30:48 -0800 (PST) Path: lh20ni29206pbb.0!nntp.google.com!news1.google.com!goblin1!goblin.stu.neva.ru!news.tornevall.net!news.jacob-sparre.dk!pnx.dk!jacob-sparre.dk!ada-dk.org!.POSTED!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: Writing Data to a file Date: Fri, 16 Dec 2011 14:30:43 +0100 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: <87sjkkod8c.fsf@hugsarin.sparre-andersen.dk> References: <344d32d6-a667-407c-bb8e-e0c504e91688@u32g2000yqe.googlegroups.com> <87zketwure.fsf@ludovic-brenta.org> <530c4f5e-3c00-4ad5-92de-a4faefad468d@p16g2000yqd.googlegroups.com> NNTP-Posting-Host: 94.191.130.196.bredband.3.dk Mime-Version: 1.0 X-Trace: munin.nbi.dk 1324042247 15834 94.191.130.196 (16 Dec 2011 13:30:47 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 16 Dec 2011 13:30:47 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) Cancel-Lock: sha1:zPIPDIXei17D6Y1IomWm9zDlck4= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: 2011-12-16T14:30:43+01:00 List-Id: awdorrin writes: > The buffer is a block of memory that contains data, it could be text, > integers, bytes, floating point numbers, whatever. type Whatever is ...; Buffer_Size : constant Natural := ...; type Buffer is array (1 .. Buffer_Size); > The AREA_PTR is the starting address of the memory block. Area_Ptr : constant System.Address := ...; Data : Buffer; for Data'Address use Area_Ptr; > So since all I have is a System.Address and offsets, I believe I have > to cast/convert this a Stream_Element_Array. No need. Just make sure your Ada data structure is located at the right address (and has the right layout). Jacob -- �Great minds discuss ideas, Average minds discuss events, Small minds discuss people.�