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,f23882dec7858ff X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.germany.com!newsfeed.utanet.at!newsfeed01.chello.at!newsfeed02.chello.at!news.hispeed.ch.POSTED!not-for-mail Message-Id: <2966907.DcY250zur0@linux1.krischik.com> From: Martin Krischik Subject: Re: What is the best way to define the Imported C function Newsgroups: comp.lang.ada Date: Sat, 26 Jan 2008 11:15:36 +0100 References: <5db8e5dd-9632-4aef-b1e3-8cc304bcd748@u10g2000prn.googlegroups.com> User-Agent: KNode/0.10.5 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: abuse@hispeed.ch Organization: hispeed.ch NNTP-Posting-Host: 84.75.167.168 (84.75.167.168) NNTP-Posting-Date: Sat, 26 Jan 2008 12:00:06 +0100 X-Trace: 6ca61479b12b6f1ee020d20667 Xref: g2news1.google.com comp.lang.ada:19604 Date: 2008-01-26T11:15:36+01:00 List-Id: qunying wrote: > Hi, > > I am learning Ada and try to test the interface with C. > > for this function, what is the best way to define the function in Ada? > > int xcb_parse_display(const char *name, char **host, int *display, int > *screen); function parse_display ( Name : in Interfaces.C.Strings.char_array_access; Host : access Interfaces.C.Strings.char_array_access; Display : access Interfaces.C.int; Screen : access Interfaces.C.int) return Interfaces.C.int; See: http://www.adaic.com/standards/05rm/html/RM-B-3.html Martin -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com