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-Thread: 103376,a71fc4911021ed50 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!tudelft.nl!txtfeed1.tudelft.nl!transit0.news.tiscali.nl!tiscali!transit1.news.tiscali.nl!dreader2.news.tiscali.nl!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Returning data from Ada to C References: <1115164192.585409.163780@z14g2000cwz.googlegroups.com> <9vYde.5480$GQ5.3731@newsread1.news.pas.earthlink.net> <4f1a9$4278d210$cf702d0d$18288@PRIMUS.CA> <1115503927.228956.100050@z14g2000cwz.googlegroups.com> <87is1thimt.fsf@insalien.org> From: Ludovic Brenta Date: Sun, 08 May 2005 16:58:05 +0200 Message-ID: <87ekchhiiq.fsf@insalien.org> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:rWn4aRWHrO1S3rnOQ1HbHobH+cg= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Tiscali bv NNTP-Posting-Date: 08 May 2005 16:57:55 CEST NNTP-Posting-Host: 83.134.247.7 X-Trace: 1115564275 dreader2.news.tiscali.nl 1352 83.134.247.7:36365 X-Complaints-To: abuse@tiscali.nl Xref: g2news1.google.com comp.lang.ada:10952 Date: 2005-05-08T16:57:55+02:00 List-Id: Ludovic Brenta writes: > procedure Hello_World (I : in out Integer; > A_Ptr : out C_IntArrs.Pointer) is > type Array_Access is access C_Integer_Arrays.C_Integer_Array; > Result : Array_Access := new C_Integer_Arrays.C_Integer_Array' > (0 => 3, 1 => 2, 2 => 1); > begin > return Result (Result'First)'Access; -- the above is wrong! A_Ptr := Result (Result'First)'Access; -- correct > end Hello_World; obviously. -- Ludovic Brenta.