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-Language: ENGLISH,ASCII X-Google-Thread: 103376,5114c1c6ad71f555 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-03 10:44:00 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!fu-berlin.de!uni-berlin.de!b0f6b.pppool.DE!not-for-mail From: "Joachim Schr�er" Newsgroups: comp.lang.ada Subject: Re: New Ada binding to OpenGL Date: Fri, 3 Jan 2003 19:38:41 +0100 Message-ID: References: NNTP-Posting-Host: b0f6b.pppool.de (213.7.15.107) Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Trace: fu-berlin.de 1041619439 12656896 213.7.15.107 (16 [76083]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:32499 Date: 2003-01-03T19:38:41+01:00 List-Id: Hello, to pass null simply write something like Gl.Glclipplane(Plane => 1, Equation => null); But why do you want to pass null access values. I expect some kind of error in the C code then. I will have a look for books were Ada/C coding is documented. I thing, the Ada95 rationale is a good reference. I will give you links later. J. Schr�er "David Holm" schrieb im Newsbeitrag news:V54Q9.3365$FF4.203703@newsb.telia.net... > Joachim Schr�er wrote: > > > 4) The subprograms taking system.address parameters are superfluous and > > represent a not very Adalike style. It is very staightforward to call a > > function with access parameter mode or with a general access type. Simply > > declare arrays of aliased variables and pass > > The_Array(The_Array'First)'Unchecked_Access. Take the following example to > > call > > procedure glClipPlane(plane : GLENUM; > > > > equation: access GLDOUBLE); -- > > ./GL/gl.h:791 > > > > > > > > package Opengl.Clip_Planes is > > > > -- Plane coefficients ----------------------------------------------- > > > > > > A : constant := 1; B : constant := 2; C : constant := 3; D : constant := > > 4; > > > > -- Plane-type and simple clip-plane constants ----------------------- > > > > type Plane is array(A .. D) of aliased Gl.Gldouble; > > > > ... > > > > > > and then in the implementation > > > > procedure Enable(The_Plane : in Plane) is > > > > begin > > > > Counter := Counter + 1; > > > > if Counter <= Clip_Plane_Indices'Last then > > > > Gl.Glclipplane(Plane => Clip_Plane_Indices(Counter), > > > > Equation => The_Plane(A)'Unchecked_Access); > > > > Gl.Glenable(Clip_Plane_Indices(Counter)); > > > > ... > > > > How can I pass null addresses this way? With System.Address I could use > GLNULL : System.Address renames System.Null_Address; > > //David