From: cm3bcawp@bs47c.staffs.ac.uk (Al Priest)
Subject: Re: Pragma Import to C "Accept" function?
Date: 1997/03/04
Date: 1997-03-04T00:00:00+00:00 [thread overview]
Message-ID: <5fgu7k$ona@bs33n.staffs.ac.uk> (raw)
In-Reply-To: dewar.856787602@merv
Robert Dewar said:
> Al Priest asks
> <<I'm looking for a "nice" way to interface to the C accept function. Given
> it's clash with the reserved word accept, is there a good way to interface
> to the function? Currently the only way I can do it is by writing a C
> function to interface to the accept, and then interfacing to that in my
> Ada program.>>
> No one ever said you must use the same name on the Ada side as on the
> C side. It is often nice to do so, but there are many cases where it
> is not possible (in addition to the reserved word case, consider
> names like _____hello and cases where Hello and hello are different
> functions).
> You just write
> pragma Import (C, Ada_Name_Of_Function, "C_Name_Of_Function");
> e.g. for your case:
> pragma Import (C, C_Accept, "accept");
> or somesuch. It would be helpful if you could track down why you had a
> misunderstanding here so that whatever text you are using can be clarified.
> The RM itself seems clear on this point.
Thanks for all the help on this subject, it's working fine now. The reason
the confusion started was that I was using an Ada83 RM, and so no mention
of this technique.
Al
--
al@priest.com
prev parent reply other threads:[~1997-03-04 0:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-02-12 0:00 Pragma Import to C "Accept" function? Al Priest
1997-02-12 0:00 ` Samuel Tardieu
1997-02-13 0:00 ` Do-While Jones
1997-02-20 0:00 ` Samuel Mize
1997-02-24 0:00 ` Robert Dewar
1997-03-04 0:00 ` Al Priest [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox