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.3 required=5.0 tests=BAYES_00,STOX_REPLY_TYPE, STOX_REPLY_TYPE_WITHOUT_QUOTES,XPRIO autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,39c061fa6e3ec349,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!feeder.erje.net!feeder.news-service.com!feed.xsnews.nl!border-3.ams.xsnews.nl!upload-1.xsnews.nl!10.10.60.13.MISMATCH!frontend-F10-13.ams.news.kpn.nl From: "ldries46" Newsgroups: comp.lang.ada Subject: acceess problem Date: Sun, 24 Jul 2011 17:59:02 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 15.4.3508.1109 X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3508.1109 Message-ID: <4e2c416b$0$2574$703f8584@news.kpn.nl> Organization: KPN.com NNTP-Posting-Host: 77.168.179.107 X-Trace: 1311523180 news.kpn.nl 2574 77.168.179.107@kpn/77.168.179.107:64493 Xref: g2news1.google.com comp.lang.ada:20334 Date: 2011-07-24T17:59:02+02:00 List-Id: I am converting a C/C++ program with openGL to Ada and found the following problem: C/C++ code: float pAxis1Amb[] = { AxL, 0, 0, 1}; glMaterialfv(vSide, GL_AMBIENT, pAxis1Amb); where : GLAPI void APIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params ); In the Ada bindings the routine is declared as: procedure glMaterialfv (face : GLenum; pname : GLenum; params : GLfloatPtr); where : type GLfloatPtr is access all GLfloat; and : subtype GLfloat is Float; I have created the following declarations : Axis1Amb : array(0..3) of GLfloat := ( AxL, 0.0, 0.0, 1.0); pAxis1Amb : GLfloatPtr := Axis1Amb'Access; Now I get the following error message : prefix of "Access" attribute must be aliased I have to follow the C/C++ code as close as possible. What do I do wrong? L. Dries