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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ea88e33ca617708 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.35.68 with SMTP id f4mr3910561pbj.5.1321647604194; Fri, 18 Nov 2011 12:20:04 -0800 (PST) Path: h5ni6766pba.0!nntp.google.com!news2.google.com!postnews.google.com!o14g2000yqh.googlegroups.com!not-for-mail From: awdorrin Newsgroups: comp.lang.ada Subject: Re: Calling Ada Procedure from C - how to handle a char ptr/array Date: Fri, 18 Nov 2011 12:19:55 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <8e5541a3-cdd5-40af-a6fd-f7539ee61326@l19g2000yqc.googlegroups.com> NNTP-Posting-Host: 192.91.147.35 Mime-Version: 1.0 X-Trace: posting.google.com 1321647596 18945 127.0.0.1 (18 Nov 2011 20:19:56 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 18 Nov 2011 20:19:56 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: o14g2000yqh.googlegroups.com; posting-host=192.91.147.35; posting-account=YkFdLgoAAADpWnfCBA6ZXMWTz2zHNd0j User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESRCNK X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20100101 Firefox/8.0,gzip(gfe) Xref: news2.google.com comp.lang.ada:14458 Content-Type: text/plain; charset=ISO-8859-1 Date: 2011-11-18T12:19:55-08:00 List-Id: Ok - so the warnings are just a reminder that both sides needs to know how big the char_array will be, that makes sense. I changed the Interface.C.To_C call to: Interfaces.C_To(C(Label, s, Count, True); and that worked without the Constraint error. After looking at the source code in i-c.adb and reading your comments I know understand why the Constraint Error was being raised. Yea, I am much more a 'C Guy' than an 'Ada Guy' :) Thanks!