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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b28f27d5b835c2e X-Google-Attributes: gid103376,public From: cm3bcawp@bs47c.staffs.ac.uk (Al Priest) Subject: Re: Pragma Import to C "Accept" function? Date: 1997/03/04 Message-ID: <5fgu7k$ona@bs33n.staffs.ac.uk>#1/1 X-Deja-AN: 223679789 References: <5ds893$qgf@bs33n.staffs.ac.uk> Organization: Staffordshire University Newsgroups: comp.lang.ada Date: 1997-03-04T00:00:00+00:00 List-Id: Robert Dewar said: > Al Priest asks > < 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