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,2c25d9643f05ffd1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-16 23:37:19 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!news-xfer2.atl.newshosting.com!news-out.superfeed.net!propagator2-maxim!news-in-maxim.spamkiller.net!news.usc.edu!attla2!ip.att.net!attbi_feed3!attbi_feed4!attbi.com!attbi_s52.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: calling an ada procedure from C++ References: <3fb24ce4$1@baen1673807.greenlnk.net> X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 12.234.124.41 X-Complaints-To: abuse@comcast.net X-Trace: attbi_s52 1069054638 12.234.124.41 (Mon, 17 Nov 2003 07:37:18 GMT) NNTP-Posting-Date: Mon, 17 Nov 2003 07:37:18 GMT Organization: Comcast Online Date: Mon, 17 Nov 2003 07:37:18 GMT Xref: archiver1.google.com comp.lang.ada:2556 Date: 2003-11-17T07:37:18+00:00 List-Id: > --type Record_Ptr is access Record_T; > ... > function Struct return Record_T is > A_Record : Record_T :=(2,4); > begin > return A_Record; > end Struct; Why do you have the Record_Ptr declaration commented out? Did you try returning a pointer, instead of a record, but it still didn't work? How about procedure Struct(Result : out Record_T) is A_Record : Record_T :=(2,4); begin Result := A_Record; end Struct; so you are doing things C-style by passing a pointer parameter.