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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,39c061fa6e3ec349 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!df3g2000vbb.googlegroups.com!not-for-mail From: Gautier write-only Newsgroups: comp.lang.ada Subject: Re: acceess problem Date: Tue, 26 Jul 2011 08:57:08 -0700 (PDT) Organization: http://groups.google.com Message-ID: <8727ccd3-d7e9-4d41-b55c-9c3d4fba1a78@df3g2000vbb.googlegroups.com> References: <4e2c416b$0$2574$703f8584@news.kpn.nl> <4e2d13bc$0$2576$703f8584@news.kpn.nl> NNTP-Posting-Host: 91.114.110.206 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1311695828 13185 127.0.0.1 (26 Jul 2011 15:57:08 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 26 Jul 2011 15:57:08 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: df3g2000vbb.googlegroups.com; posting-host=91.114.110.206; posting-account=gRqrnQkAAAAC_02ynnhqGk1VRQlve6ZG User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HNKURAELSC X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.9 Safari/533.2,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:21336 Date: 2011-07-26T08:57:08-07:00 List-Id: On 25 juil, 10:27, Simon Wright wrote: > Replace 'Access with 'Unchecked_Access or, if that doesn't work, with > the (GNAT-special) 'Unrestricted_Access. Unless 'Unrestricted_Access has been inbetween added to the language, there is a way to have it in a pure Ada form: function Cvt is new Ada.Unchecked_Conversion(System.Address,DoublePtr); -- This method is functionally identical as GNAT's Unrestricted_Access -- but has no type safety (cf GNAT Docs) pragma No_Strict_Aliasing(DoublePtr); -- recommended by GNAT 2005 procedure Vertex (v: Double_vector_3D) is begin Vertex3dv(Cvt(v(0)'Address)); end Vertex; ^this is an excerpt from an existing GL binding (why reinvent it?)... http://globe3d.svn.sourceforge.net/viewvc/globe3d/bindings/gl.adb?revision=152&view=markup ______________________________________________________________________________ Gautier's Ada programming -- http://gautiersblog.blogspot.com/search/label/Ada NB: follow the above link for a valid e-mail address