comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: What is the best way to define the Imported C function
Date: Sat, 26 Jan 2008 11:15:36 +0100
Date: 2008-01-26T11:15:36+01:00	[thread overview]
Message-ID: <2966907.DcY250zur0@linux1.krischik.com> (raw)
In-Reply-To: 5db8e5dd-9632-4aef-b1e3-8cc304bcd748@u10g2000prn.googlegroups.com

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



  reply	other threads:[~2008-01-26 10:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-26  5:05 What is the best way to define the Imported C function qunying
2008-01-26 10:15 ` Martin Krischik [this message]
2008-01-26 16:24   ` qunying
2008-01-26 10:56 ` Dmitry A. Kazakov
2008-01-26 12:15   ` Stefan Lucks
2008-01-27  1:31 ` Jeffrey R. Carter
2008-01-28 17:18   ` Adam Beneschan
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox