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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e3208961d115a89b,start X-Google-Attributes: gid103376,public From: Ralf Lundberg Subject: Simple Ada-95 Question (regarding X11Ada bindings) Date: 1997/01/20 Message-ID: <32E34E8E.FDD@carmenta.se>#1/1 X-Deja-AN: 211223073 content-type: text/plain; charset=us-ascii organization: Carmenta AB mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 3.0 (X11; I; SunOS 5.5 sun4m) Date: 1997-01-20T00:00:00+00:00 List-Id: I did some Ada programming som ten years ago, but I have been off for quite some time. I have not used Ada95 until now. However I now have to port an application from Telesoft Ada with Telewindows X-bindings to gnat (GNU) with X11Ada Ada95 X-bindings. In the library I will use the ada procedures matches the original C-versions very closely. Some arrays are passed as a pointer to the element type, plus a number telling the length of the array, in the traditional C way. --------- QUESTION: How do I make something of type access A actually point to the first element in an array of A's? --------- I have found out that if I take 'Address on a variable of type A that is declared as aliased I get something of the right type. I would like to do that with the first element in the array, bu I can't make that aliased.. Anwer by mail preferred, but I will poll this newsgroup as well.. ---------------------------------------------- This is one procedure I would like to call... procedure XFillPolygon( display: access XDisplay; d : X.Drawable; gc : access XGC; points : access XPoint; -- ..and this is the evil one.. npoints: X.signed_int; shape : X.signed_int; mode : X.signed_int); -- Xlib.h:2595 type XPoint is -- Xlib.h:398 record XX: X.signed_short; -- Xlib.h:397 y : X.signed_short; -- Xlib.h:397 end record; -- ___________________________________________________________________ Ralf Lundberg http://www.cd.chalmers.se/~ralf/index.html (email home: )