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,546e0e1e012e8cb3,start X-Google-Attributes: gid103376,public From: gvc@ocsystems.com (G. Vincent Castellano) Subject: Re: Simple Ada-95 Question (regarding X11Ada bindings) Date: 1997/01/27 Message-ID: <1997Jan27.165642.14195@ocsystems.com>#1/1 X-Deja-AN: 212616970 organization: OC Systems, Inc. newsgroups: comp.lang.ada Date: 1997-01-27T00:00:00+00:00 List-Id: % 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 ^^^^^^^^ Do you mean 'Access here? % 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.. % You need to declare an 'array of aliased' objects, as illustrated by the following declarations and call to a procedure with a simlar interface: type Vector_Of_Point_Type is array (X11.Signed_Int range <>) of aliased X.Xlib.XPoint; Points: Vector_Of_Point_Type := ((C.X1, C.Y1), (C.X2, C.Y1), (C.X2, C.Y2), (C.X1, C.Y2), (C.X1, C.Y1)); begin X11.XLib.XDrawLines( Display, X11.Drawable(C.Gw.Window), C.Gw.Gc_Always, Points(Points'First)'Access, Points'Length, X11.Coordmodeorigin); == G. Vincent Castellano :: X/Ada WWW => http://www.ocsystems.com/xada == == "If virtual memory did not exist, it would have == == become necessary for us to invent it." ==