From: Hyman Rosen <hymie@prolifics.com>
Subject: Re: Help! (How to do this (C) in Ada?
Date: 1999/05/13
Date: 1999-05-13T21:34:23+00:00 [thread overview]
Message-ID: <t7aev8ejp4.fsf@calumny.jyacc.com> (raw)
In-Reply-To: 7heg6m$43a$1@nnrp1.deja.com
byhoe@my-dejanews.com writes:
> I am puzzle with the following C code:
> #define InheritLayout ((Boolean (*)())_Inherit)
> How can I implement the above in Ada?
In C, this is a typecast of the value of _Inherit (whatever that is)
into a pointer to a function which takes no arguments and returns a
Boolean (whatever that is). I don't know Ada myself, but my guess
would be that in Ada you declare a type which is access to the correct
type of function, then use unchecked_conversion to convert _Inherit to
that type.
I suspect you will get better information on how to use a more
Ada-appropriate style if you describe your actual design and what
it is meant to accomplish.
next prev parent reply other threads:[~1999-05-13 0:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-05-13 0:00 Help! (How to do this (C) in Ada? byhoe
1999-05-13 0:00 ` Hyman Rosen [this message]
1999-05-14 0:00 ` dennison
1999-05-14 0:00 ` Hyman Rosen
1999-05-16 0:00 ` Robert Dewar
1999-05-17 0:00 ` byhoe
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox