From: Ralf Lundberg <rl@carmenta.se>
Subject: Simple Ada-95 Question (regarding X11Ada bindings)
Date: 1997/01/20
Date: 1997-01-20T00:00:00+00:00 [thread overview]
Message-ID: <32E34E8E.FDD@carmenta.se> (raw)
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
<ralf@carmenta.se> (email home: <ralf@cs.chalmers.se>)
next reply other threads:[~1997-01-20 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-01-20 0:00 Ralf Lundberg [this message]
1997-01-27 0:00 ` Simple Ada-95 Question (regarding X11Ada bindings) Keith Allan Shillington
-- strict thread matches above, loose matches on Subject: below --
1997-01-27 0:00 G. Vincent Castellano
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox