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.4 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY,PLING_QUERY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f7c597cb40b4adf8 X-Google-Attributes: gid103376,public From: byhoe@my-dejanews.com Subject: Re: Help! (How to do this (C) in Ada? Date: 1999/05/17 Message-ID: <7hnt3c$j39$1@nnrp1.deja.com>#1/1 X-Deja-AN: 478645054 References: <7heg6m$43a$1@nnrp1.deja.com> <7hmc99$jrm$1@nnrp1.deja.com> X-Http-Proxy: 1.0 x38.deja.com:80 (Squid/1.1.22) for client 202.188.38.129 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Mon May 17 01:58:05 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04C-Caldera [en] (X11; I; Linux 2.0.33 i486) Date: 1999-05-17T00:00:00+00:00 List-Id: In article <7hmc99$jrm$1@nnrp1.deja.com>, Robert Dewar wrote: > In article <7heg6m$43a$1@nnrp1.deja.com>, > byhoe@my-dejanews.com wrote: > > I am puzzle with the following C code: > > > > #define InheritLayout ((Boolean (*)())_Inherit) > > > > How can I implement the above in Ada? > > > > Anyone? Please help. > > > > Thanks in advance. > > This is much too low a level question. Any idea of translating > individual C statements into Ada is in the general case flawed, > though it may make sense in the context of a particular binding. > You need to give more context for why you are asking the > above question, and explain what the symbols mean. For example, > one assumes Boolean is what you might guess, but from what > you gave, it might itself be a fancy macro, especially since > you are not using the standard C style of all upper case for > macro names! In fact, I found this line in one of the code extension to the X11 library. There is an identical line which can be found in X11, Xaw's FormP.h. I don't understand why this line is duplicated in the third party library but I believe there is its usage somewhere which I cannot find any instances. _Inherit can be traced to be identical to _XtInherit which is declare in X11's IntrinsicP.h as: extern void _XtInherit (void); (The same in my third party library but without the Xt, eg, _Inherit.) --== Sent via Deja.com http://www.deja.com/ ==-- ---Share what you know. Learn what you don't.---