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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ef005e7bce124a2f,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-21 20:28:43 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!sn-xit-08!supernews.com!border3.nntp.aus1.giganews.com!nntp.giganews.com!wn14feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc51.ops.asp.att.net.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Interfaces.C.Pointers X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 12.234.13.56 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc51.ops.asp.att.net 1056252522 12.234.13.56 (Sun, 22 Jun 2003 03:28:42 GMT) NNTP-Posting-Date: Sun, 22 Jun 2003 03:28:42 GMT Organization: AT&T Broadband Date: Sun, 22 Jun 2003 03:28:42 GMT Xref: archiver1.google.com comp.lang.ada:39551 Date: 2003-06-22T03:28:42+00:00 List-Id: I seems to me that Interfaces.C.Pointers really isn't just about C pointers (though that may be its main use), but the Value functions let you convert a pointer to an element to a pointer to an array of variable size. type general_array_type is array(integer range <>) of integer; procedure p(pi : access integer; length : natural) is type static is array(1 .. 3) of integer; x : static; p(x(x'first),3); Inside procedure p, by using Interfaces.C.Pointers, you can my_copy : general_array_type := value(pi, ptrdiff_t(length)); Am I misunderstanding?