Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Ada > Re: Lack of for...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 25 of 38 Topic 5649 of 5930
Post > Topic >>

Re: Lack of formal syntax undermines Ada

by Robert A Duff <bobduff@[EMAIL PROTECTED] > Apr 12, 2008 at 04:02 PM

Gary Scott <garylscott@[EMAIL PROTECTED]
> writes:

> Sorry, non-Ada nube type question:  How is inter-language calling of
> functions that do allow inout and out arguments handled (say calling a C
> API)?

Well, C doesn't have anything like Ada's 'out' or 'in out'.

You can pass a pointer in C, and you can do the same in Ada:

    function F (X: access Integer) return Integer;
    pragma Im****t (C, F);

>...I assume the restriction only applies to intra-language calls.

No, that assumption is wrong.  An Ada function declaration cannot use
'out' or 'in out'.  That's true even if there's a pragma Im****t,
so the body of the function is in some other language.

If that other language sup****ts something like Ada's 'in out',
well, too bad.  The compiler writer will have to invent
some other way to map that language onto what's allowed in Ada.

>...It
> seems like could create some messiness if the compiler always assumed
> only IN arguments in functions.

Yes, it is an annoying restriction (whether or not you're
interfacing to C).

- Bob
 




 38 Posts in Topic:
Lack of formal syntax undermines Ada
usenet@[EMAIL PROTECTED]   2008-04-11 02:41:28 
Re: Lack of formal syntax undermines Ada
"Peter C. Chapin&quo  2008-04-11 07:20:15 
Re: Lack of formal syntax undermines Ada
Georg Bauhaus <rm.tsoh  2008-04-11 19:27:17 
Re: Lack of formal syntax undermines Ada
Adam Beneschan <adam@[  2008-04-11 11:13:16 
Re: Lack of formal syntax undermines Ada
John McCabe <john@[EMA  2008-04-11 22:25:50 
Re: Lack of formal syntax undermines Ada
Robert A Duff <bobduff  2008-04-11 17:45:07 
Re: Lack of formal syntax undermines Ada
John McCabe <john@[EMA  2008-04-11 23:37:53 
Re: Lack of formal syntax undermines Ada
Robert A Duff <bobduff  2008-04-12 08:57:02 
Re: Lack of formal syntax undermines Ada
"(see below)" &  2008-04-12 16:06:45 
Re: Lack of formal syntax undermines Ada
John McCabe <john@[EMA  2008-04-12 17:25:53 
Re: Lack of formal syntax undermines Ada
"(see below)" &  2008-04-12 18:55:14 
Re: Lack of formal syntax undermines Ada
John McCabe <john@[EMA  2008-04-12 23:19:38 
Re: Lack of formal syntax undermines Ada
"(see below)" &  2008-04-13 02:13:07 
Re: Lack of formal syntax undermines Ada
John McCabe <john@[EMA  2008-04-13 12:51:01 
Re: Lack of formal syntax undermines Ada
"(see below)" &  2008-04-13 15:13:45 
Re: Lack of formal syntax undermines Ada
John McCabe <john@[EMA  2008-04-13 20:34:09 
Re: Lack of formal syntax undermines Ada
"(see below)" &  2008-04-13 21:51:59 
Re: Lack of formal syntax undermines Ada
John McCabe <john@[EMA  2008-04-13 22:06:51 
Re: Lack of formal syntax undermines Ada
Gary Scott <garylscott  2008-04-12 17:16:55 
Re: Lack of formal syntax undermines Ada
"Peter C. Chapin&quo  2008-04-12 14:43:33 
Re: Lack of formal syntax undermines Ada
Gary Scott <garylscott  2008-04-12 14:16:55 
Re: Lack of formal syntax undermines Ada
Robert A Duff <bobduff  2008-04-12 16:04:45 
Re: Lack of formal syntax undermines Ada
Gary Scott <garylscott  2008-04-12 23:32:45 
Re: Lack of formal syntax undermines Ada
Robert A Duff <bobduff  2008-04-12 21:16:25 
Re: Lack of formal syntax undermines Ada
Robert A Duff <bobduff  2008-04-12 16:02:30 
Re: Lack of formal syntax undermines Ada
Pascal Obry <pascal@[E  2008-04-12 22:52:13 
Re: Lack of formal syntax undermines Ada
Adam Beneschan <adam@[  2008-04-11 16:08:12 
Re: Lack of formal syntax undermines Ada
dirk@[EMAIL PROTECTED] (  2008-04-12 07:16:43 
Re: Lack of formal syntax undermines Ada
Jean-Pierre Rosen <ros  2008-04-14 09:23:10 
Re: Lack of formal syntax undermines Ada
anon@[EMAIL PROTECTED] (  2008-04-13 09:46:01 
Re: Lack of formal syntax undermines Ada
Florian Weimer <fw@[EM  2008-04-14 00:01:34 
Re: Lack of formal syntax undermines Ada
Florian Weimer <fw@[EM  2008-04-14 00:04:01 
Re: Lack of formal syntax undermines Ada
usenet@[EMAIL PROTECTED]   2008-04-15 05:57:42 
Re: Lack of formal syntax undermines Ada
"Peter C. Chapin&quo  2008-04-15 22:26:23 
Re: Lack of formal syntax undermines Ada
"Randy Brukardt"  2008-04-17 01:37:08 
Re: Lack of formal syntax undermines Ada
usenet@[EMAIL PROTECTED]   2008-04-15 06:22:11 
Re: Lack of formal syntax undermines Ada
Adam Beneschan <adam@[  2008-04-15 09:08:08 
Re: Lack of formal syntax undermines Ada
Eric Hughes <eric.eh9@  2008-04-15 20:14:45 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 14:57:37 CDT 2008.